Skip to content

Instantly share code, notes, and snippets.

@ratulcse10
Created September 22, 2022 14:03
Show Gist options
  • Save ratulcse10/1da2002436c158e7e0fcab729c145e43 to your computer and use it in GitHub Desktop.
Save ratulcse10/1da2002436c158e7e0fcab729c145e43 to your computer and use it in GitHub Desktop.
node issue solvew
https://stackoverflow.com/questions/67399785/how-to-solve-npm-install-error-npm-err-code-1
When I try to run the npm install command in an older project, I faced the same issues and I resolved it by updating the dependencies in package.json to the latest versions by following these steps:
delete folder node_modules folder and file package-lock.json
install npm-check-updates globally, to update all packages to a new major version
run npm install -g npm-check-updates
run ncu -u to update dependencies in package.json to latest version
Note: you can use npm update, but npm update doesn't update to latest version
run npm install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment