Reputation: 123
I downloaded a npm project which worked just fine on other computers. I try to run "npm install" and "npm start" commands, but I get "ERR" on each line. I tried different solutions, like deleting the package-lock file, installing npm with the react-scripts argument, but nothing seems to help. I get:
loadDep:react-scripts → 3 ▄ ╢███████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @testing-library/[email protected]: wanted: {"node":">=8","npm":">=6"} (current: {"node":"8.10.npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
loadDep:fsevents → 304 ▐ ╢██████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":"^8.16.0 || ^10.6.0 || >=11.0.0"} (current: {"node":"8.10.0"loadDep:semver → resolveW ▌ ╢██████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm ERR! Linux 4.19.84-microsoft-standard
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /mnt/c/Projects/myproj-front-end/myproj-front-end/npm-debug.log````
Upvotes: 2
Views: 2434
Reputation: 929
I was able to solve this issue by installing the latest version of npm and rebooting my machine afterwards. The reboot is important, otherwise you will still be using the old version of npm.
npm install -g npm@latest
reboot
If you are using a non-Unix terminal (windows), simply switch your computer off and on again and omit the reboot
command.
Upvotes: 1
Reputation: 31
You must be using an old npm... It may be some newer version broke the functionality of the older version.
Try upgrading your npm through sudo npm install -g npm@version for a specific version. Then open the new terminal and check for the npm version by npm -v.
Upvotes: 2