Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I resolve this error that occurs when using ng new? [duplicate]

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 [email protected]: 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?

like image 595
Sipeng He Avatar asked Sep 02 '25 04:09

Sipeng He


1 Answers

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.

like image 80
JAS90 Avatar answered Sep 05 '25 02:09

JAS90