Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error: Missing required argument #1 #3356

Closed
1 task done
bibhuticoder opened this issue Jun 3, 2021 · 3 comments
Closed
1 task done

[BUG] Error: Missing required argument #1 #3356

bibhuticoder opened this issue Jun 3, 2021 · 3 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release

Comments

@bibhuticoder
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Error while running "npm install bull --save"

Expected Behavior

It should install the "bull" package

Steps To Reproduce

  1. In this environment...
  2. With this config...
  3. Run 'sudo npm install'
  4. See error...
    npm-debug.log

Error

npm ERR! Linux 5.4.0-1048-aws
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "bull" "--save"
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! //*/npm-debug.log

Environment

  • OS: ubuntu 18.04
  • Node: v14.17.0
  • npm: 7.15.1
@bibhuticoder bibhuticoder added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Jun 3, 2021
@nlf
Copy link
Contributor

nlf commented Jun 3, 2021

your debug log shows different node and npm versions than what you filled out in the issue template

npm ERR! node v8.10.0
npm ERR! npm v3.5.2

in your steps to reproduce, i see you're running sudo npm install. are you using something like nvm to manage your node installation? if so, it's likely that because of sudo you're not using the expected versions of node and npm. you shouldn't need sudo with npm unless you're trying to install packages into a directory your user does not have permission to write in.

@ljharb
Copy link
Contributor

ljharb commented Jun 3, 2021

(with nvm in particular, you never need sudo for anything)

@bibhuticoder
Copy link
Author

Thanks

I was able to solve it this way: #681 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

3 participants