npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

npm audit passes code EINVALIDTAGNAME

Im facing an identical issue as stated in a bug report filed Sep '18 by another user.

It was mentioned by zkat

This seems like a bug for sure, but I would need actual reproduction steps that I can run myself in order to figure out what happened. Smells like a bug in lock-verify , though. /cc @iarna


npm audit throws an error with the following log file

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’, ‘/usr/local/bin/npm’, ‘audit’ ]
2 info using npm@6.4.1
3 info using node@v10.15.0
4 verbose npm-session ae712c6d3f0d7ab6
5 verbose stack Error: Invalid tag name “[object Object]”: Tags may not have any characters that encodeURIComponent encodes.
5 verbose stack at invalidTagName (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:87:15)
5 verbose stack at fromRegistry (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:290:13)
5 verbose stack at Function.resolve (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:77:12)
5 verbose stack at Object.keys.forEach.name (/usr/local/lib/node_modules/npm/node_modules/lock-verify/index.js:26:26)
5 verbose stack at Array.forEach ()
5 verbose stack at Promise.all.then.result (/usr/local/lib/node_modules/npm/node_modules/lock-verify/index.js:25:25)
6 verbose cwd /Users/user/sub_folder/sub_folder/sub_folder
7 verbose Darwin 18.2.0
8 verbose argv “/usr/local/bin/node” “/usr/local/bin/npm” “audit”
9 verbose node v10.15.0
10 verbose npm v6.4.1
11 error code EINVALIDTAGNAME
12 error Invalid tag name “[object Object]”: Tags may not have any characters that encodeURIComponent encodes.
13 verbose exit [ 1, true ]

I have removed node_modules and reran npm install to no avail. Is there a fix available for this yet?