Skip to content

[BUG] npm outdated fails with an error, does not say _where_ the issue lies. #1703

Closed
@andreieftimie

Description

@andreieftimie

Current Behavior:

$ npm outdated --all
npm ERR! Only tag, version, and range are supported

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/aeftimie/.npm/_logs/2020-08-22T16_25_38_984Z-debug.log

The complete log:

$ cat /Users/aeftimie/.npm/_logs/2020-08-22T16_25_38_984Z-debug.log
0 verbose cli [
0 verbose cli   '/Users/aeftimie/.nvm/versions/node/v12.16.1/bin/node',
0 verbose cli   '/Users/aeftimie/.nvm/versions/node/v12.16.1/bin/npm',
0 verbose cli   'outdated',
0 verbose cli   '--all'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/Users/aeftimie/.nvm/versions/node/v12.16.1/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:/Users/aeftimie/work/vo/vod/.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:/Users/aeftimie/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/Users/aeftimie/.nvm/versions/node/v12.16.1/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 6ms
18 verbose npm-session e773fd4ecdc5fcb6
19 timing npm:load Completed in 11ms
20 timing arborist:ctor Completed in 0ms
21 timing command:outdated Completed in 10471ms
22 verbose stack Error: Only tag, version, and range are supported
22 verbose stack     at pickManifest (/Users/aeftimie/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:92:11)
22 verbose stack     at module.exports (/Users/aeftimie/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:186:18)
22 verbose stack     at getOutdatedInfo (/Users/aeftimie/.nvm/versions/node/v12.16.1/lib/node_modules/npm/lib/outdated.js:147:22)
22 verbose stack     at runMicrotasks (<anonymous>)
22 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:97:5)
22 verbose stack     at async Promise.all (index 1248)
22 verbose stack     at async outdated_ (/Users/aeftimie/.nvm/versions/node/v12.16.1/lib/node_modules/npm/lib/outdated.js:201:3)
22 verbose stack     at async outdated (/Users/aeftimie/.nvm/versions/node/v12.16.1/lib/node_modules/npm/lib/outdated.js:43:16)
23 verbose cwd /Users/aeftimie/work/vo/vod
24 verbose Darwin 19.6.0
25 verbose argv "/Users/aeftimie/.nvm/versions/node/v12.16.1/bin/node" "/Users/aeftimie/.nvm/versions/node/v12.16.1/bin/npm" "outdated" "--all"
26 verbose node v12.16.1
27 verbose npm  v7.0.0-beta.6
28 error Only tag, version, and range are supported
29 verbose exit [ 1, undefined ]

Expected Behavior:

  1. It should not fail. If there are non-conform package versions in the tree those should be noted and an output should still be presented. This should not be an all-or-nothing operation

  2. If it fails, it should point the user in the direction of the failure, so that he may address the issue.

In my case I do have a fairly complex dependency tree. Yet I have to go one by one through all deps, from all packages to figure out where this error comes from.

Steps To Reproduce:

No specific steps at this time. I might try to get a minimal reproducible testcase.

Environment:

  • macOS Catalina 10.15.6
  • node: v12.16.1
  • npm: v7.0.0-beta.6
  • workspaces enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions