English 中文(简体)
When I execute npx eslint -- init, the console throw me errors
原标题:

My problem is when I try to excute the command npx eslint --init, I got the next errors and I don t know what I should do

**Errors:

**

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: google-translate-clone@0.0.0
npm ERR! Found: @typescript-eslint/parser@6.2.0
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   dev @typescript-eslint/parser@"^6.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/eslint-plugin@5.62.0
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR!   dev @typescript-eslint/eslint-plugin@"^5.52.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:UsersHPAppDataLocal
pm-cache\_logs2023-07-30T21_06_54_265Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: C:UsersHPAppDataLocal
pm-cache\_logs2023-07-30T21_06_54_265Z-debug-0.log

**

Answers**

You can also run this command directly using npm init @eslint/config .

√ How would you like to use ESLint? · style

√ What type of modules does your project use? · esm

√ Which framework does your project use? · react

√ Does your project use TypeScript? · No / Yes

√ Where does your code run? · browser

√ How would you like to define a style for your project? · guide

√ Which style guide do you want to follow? · standard-with-typescript

√ What format do you want your config file to be in? · JavaScript

Checking peerDependencies of eslint-config-standard-with-typescript@latest

The config that you ve selected requires the following dependencies:

eslint-plugin-react@latest eslint-config-standard-with-typescript@latest @typescript-eslint/eslint-plugin@^5.52.0 eslint@^8.0.1 eslint-plugin-import@^2.25.2 eslint-plugin-n@^15.0.0 || ^16.0.0 eslint-plugin-promise@^6.0.0 typescript@*

√ Would you like to install them now? · No / Yes

√ Which package manager do you want to use? · npm

Installing eslint-plugin-react@latest, eslint-config-standard-with-typescript@latest, @typescript-eslint/eslint-plugin@^5.52.0, eslint@^8.0.1, eslint-plugin-import@^2.25.2, eslint-plugin-n@^15.0.0 || ^16.0.0 , eslint-plugin-promise@^6.0.0, typescript@*

I don t know what is failing, and I have seen that can be by a version of node, but I have a version that should be work: v18.12.1.

Is there a solution of this problem?

I have been triying to active eslint with the command npx eslint --init after of installing it, but the only thing that i get are errors

问题回答

暂无回答




相关问题
Trying to install Flowise and npm cannot find it

On the https://flowiseai.com/ website, it says that all I have to do to use flowise is the following: npm install -g flowise npx flowise start However, when I try to do the install, it doesn t work....

Cannot destructure property name of node as it is null

when I want to install dependencies of the aurelia project, got this error: npm ERR! code 1 npm ERR! git dep preparation failed npm ERR! command /Users/ehsanghaffarii/.nvm/versions/node/v15.5.1/bin/...

npm install issues on Ubuntu 9.04

I’m trying to install npm using the commands from here: http://howtonode.org/introduction-to-npm Specifically, when I run: curl http://npmjs.org/install.sh | sh This is the error I get... node cli....

热门标签