33

I've installed the angular-cli with the command npm install -g @angular/cli. When I try to run the command ng new and create a new project, an error occurs:

⠙ Installing packages (npm)...npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz - Not found
npm ERR! 404 
npm ERR! 404  '@types/eslint@https://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

How should this error be resolved?

R. Richards
  • 24,603
  • 10
  • 64
  • 64
Sipeng He
  • 293
  • 3
  • 5

4 Answers4

31

Happening for others as well when attempting to install React or any other framework dependent on eslint.

create-react-app aborting - ESLINT not found

Heres a link to Eslint github: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/61032

A workaround for now is to run ng new app --skip-install, then add "@types/eslint": "8.4.3" to your package.json and do npm install.

JAS90
  • 321
  • 3
  • 5
  • Will this approach work for Angular (ng new angularProject) ? Even I am facing this issue in angular – Jaideep Jun 30 '22 at 21:37
  • 1
    @jaideep it should. I'm using Angular (existing project not new) and adding "@types/eslint": "8.4.3" to my devDependencies worked for me. – Brent Jun 30 '22 at 21:41
1

include to package.json

"resolutions": {
"@types/eslint": "8.4.3"
}
0

I solved using an older version of the script, with this command:

npx create-react-app --scripts-version 4.0.3 app-name
mazzod
  • 11
  • 1
  • 4
0

Try installing the dependency locally with version 8.4.3 temporarily. It worked for me

npm i -D @types/eslint@8.4.3
Dharman
  • 30,962
  • 25
  • 85
  • 135