npm ls -g depth=0 is not working


(nastya) #1

I try this command npm ls -g depth=0, but result is:
Unhandled rejection Error: Invalid tag name “depth=0”: Tags may not have any characters that encodeURIComponent encodes.
at invalidTagName (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:87:15)
at fromRegistry (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:290:13)
at resolve (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:77:12)
at npa (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:48:10)
at /usr/local/lib/node_modules/npm/lib/ls.js:65:17
at Array.map ()
at ls.fromTree (/usr/local/lib/node_modules/npm/lib/ls.js:61:17)
at /usr/local/lib/node_modules/npm/lib/ls.js:42:7
at /usr/local/lib/node_modules/npm/lib/install/read-shrinkwrap.js:49:14
at a (/usr/local/lib/node_modules/npm/node_modules/iferr/iferr.js:3:64)
at BB.join.then (/usr/local/lib/node_modules/npm/lib/install/read-shrinkwrap.js:34:16)
at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:694:18)

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! /Users/complexityclass/.npm/_logs/2019-01-23T11_32_26_157Z-debug.log

I’m sorry, I forgot --depth=)


(John Gee) #2

depth is an option, you are just missing the leading dashes:

npm ls -g --depth=0

(The message about cb() never called is possibly due to a bug in the error handling in npm, and is already being tracked and investigated in [crash] npm ERR! cb() never called!. You have the simplest reproduce steps I have seen though!)


(system) closed #3

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