"npm install" error: Missing required argument #1

Hello! I am receiving the following error message when I run npm install:

npm ERR! Linux 4.18.0-20-generic
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>
WARN engine @slack/web-api@5.0.1: wanted: {"node":">= 8.9.0","npm":">= 5.5.1"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine @slack/webhook@5.0.0: wanted: {"node":">= 8.9.0","npm":">= 5.5.1"} (current: {"node":"8.10.0","npm":"3.5.2"})

npm ERR! Please include the following file with any support request:
npm ERR!     /home/gernene/Projects/halp/walrus/npm-debug.log

I’ve also attached my npm-debug.log and wanted to point out that the error’s support link is pointing to a now-archived Github repository. Thank you for your time!

npm-debug.log (203.7 KB)

You are using a rather old version of npm. The current version is 6.9.0, and the packages you are working with are asking for npm >= 5.5.1.

Hi! I’ve upgraded to a newer version, but I’m now getting:

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/fd95bcd3'8878546b0407.lock for /home/gernene/Projects/halp

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/01cf1b26'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/152f752f'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/6ddd0612'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/91020128'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/84a1eb02'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/24b7b075'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/7b89a41e'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/fea3b61d'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/d9c03c5d'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/70c9eee8'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/cce53469'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/df5eb36e'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/2476ab83'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/c215ff08'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/a807246f'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/ccb6b154'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/8bfecd03'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/2eb01877'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/b56761da'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/f3ce5b35'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/327dce95'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/9ce582b2'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/087614ee'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/d6931ef6'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/00e7fc3e'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/3b53b4de'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/c933a911'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/cae03a7a'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/92a2c1b1'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/c6a755d1'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/b9623fed'8878546b0407.lock for /home/gernene/Projects/halp

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/8fc16c58'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/f38bda34'8878546b0407.lock for /home/gernene/Projects/halp

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/4b63ed53'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/d943a8e3'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/082b6f8e'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/b0dc7617'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/79023c47'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/65eba040'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/63b4bb74'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/acd66804'8878546b0407.lock for /home/gernene/Projects/halp

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/3e24eaea'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/befc3a71'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/b476fef4'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/ddc01d47'8878546b0407.lock for /home/gernene/Projects/halp

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/d89acd9c'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/fe0d7197'8878546b0407.lock for /home/gernene/Projects/halp

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/36514cf8'

Unhandled rejection Error: EACCES: permission denied, open '/home/gernene/.npm/_cacache/tmp/8b382ade'

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gernene/.npm/_logs/2019-06-10T20_43_21_821Z-debug.log

You might have some files left behind with root ownership after global installs using sudo (due to bugs).

The short version is run this to fix the ownership, then try your command again (assuming bash shell):


sudo chown -R $(whoami) ~/.npm

This did the trick. Thank you very much!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.