FG
💻 Software🛠️ Developer ToolsMicrosoft

[BUG] Missing required argument #1

Freshover 5 years ago
Mar 14, 20260 views
Confidence Score79%
79%

Problem

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-debug.log

Error Output

error Error: Missing required argument #1

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence92% success rate9 verificationsLast verified Mar 14, 2026

Solution: [BUG] Missing required argument #1

Low Risk

Same problem. It appears something was released that breaks older versions of npm (we were using 3.5.2, the most current version using apt-get). We fixed this by updating to the latest version of npm as a RUN command in our Dockerfile `RUN npm install -g npm@latest` We were installing npm via apt-get in a list of apt installs, but the latest release of npm isn't available through the apt ins

74

Trust Score

9 verifications

92% success
  1. 1

    It appears something was released that breaks older versions of npm (we were usi

    It appears something was released that breaks older versions of npm (we were using 3.5.2, the most current version using apt-get). We fixed this by updating to the latest version of npm as a RUN command in our Dockerfile

  2. 2

    `RUN npm install -g npm@latest`

    `RUN npm install -g npm@latest`

  3. 3

    We were installing npm via apt-get in a list of apt installs, but the latest rel

    We were installing npm via apt-get in a list of apt installs, but the latest release of npm isn't available through the apt install option. So, after we install the old version of npm in the apt list we updated it on the next line of the Dockerfile with the command above. Hopefully updating it will not break anything you're doing, and hope this helps some of you.

Validation

Resolved in npm/cli GitHub issue #681. Community reactions: 127 upvotes.

Verification Summary

Worked: 9
Partial: 2
Failed: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

npmpackage-managernodejsawaiting-informationregistryneeds-discussionbug