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] npm outdated -g shows TypeError: Cannot read property 'length' of undefined #539

Closed
doggy8088 opened this issue Nov 30, 2019 · 2 comments
Labels
Bug thing that needs fixing

Comments

@doggy8088
Copy link

What / Why

I tried the following command in my laptop:

npm outdated -g

It shows:

G:\>npm outdated -g
npm ERR! Cannot read property 'length' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-11-30T16_52_02_887Z-debug.log

Here is the full debug.log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\PROGRA~1\\nodejs\\node.exe',
1 verbose cli   'C:\\PROGRA~1\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'outdated',
1 verbose cli   '-g' ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose npm-session 697f9ba433167f3e
5 http fetch GET 304 https://registry.npmjs.org/lite-server 522ms (from cache)
6 http fetch GET 304 https://registry.npmjs.org/express-generator 526ms (from cache)
7 silly pacote registry packument for lite-server@^2.3.0 fetched in 556ms
8 silly pacote registry packument for express-generator@^4.16.1 fetched in 558ms
9 http fetch GET 304 https://registry.npmjs.org/vsts-npm-auth 539ms (from cache)
10 silly pacote registry packument for vsts-npm-auth@^0.37.0 fetched in 573ms
11 http fetch GET 304 https://registry.npmjs.org/jshint 551ms (from cache)
12 silly pacote registry packument for jshint@^2.9.7 fetched in 585ms
13 http fetch GET 304 https://registry.npmjs.org/npm-windows-upgrade 555ms (from cache)
14 http fetch GET 304 https://registry.npmjs.org/http-server 560ms (from cache)
15 silly pacote registry packument for npm-windows-upgrade@^6.0.1 fetched in 590ms
16 silly pacote registry packument for http-server@^0.9.0 fetched in 592ms
17 http fetch GET 304 https://registry.npmjs.org/gulp 565ms (from cache)
18 silly pacote registry packument for gulp@^4.0.0 fetched in 597ms
19 http fetch GET 304 https://registry.npmjs.org/generator-code 571ms (from cache)
20 silly pacote registry packument for generator-code@^1.1.32 fetched in 604ms
21 http fetch GET 304 https://registry.npmjs.org/windows-build-tools 568ms (from cache)
22 silly pacote registry packument for windows-build-tools@^2.3.0 fetched in 603ms
23 http fetch GET 304 https://registry.npmjs.org/eslint-plugin-react 585ms (from cache)
24 silly pacote registry packument for eslint-plugin-react@^7.13.0 fetched in 616ms
25 http fetch GET 304 https://registry.npmjs.org/prettier 585ms (from cache)
26 silly pacote registry packument for prettier@^1.15.3 fetched in 621ms
27 http fetch GET 304 https://registry.npmjs.org/json-server 593ms (from cache)
28 http fetch GET 304 https://registry.npmjs.org/parcel-bundler 596ms (from cache)
29 silly pacote registry packument for json-server@^0.14.2 fetched in 630ms
30 silly pacote registry packument for parcel-bundler@^1.11.0 fetched in 629ms
31 http fetch GET 304 https://registry.npmjs.org/serve 598ms (from cache)
32 silly pacote registry packument for serve@^11.2.0 fetched in 633ms
33 http fetch GET 304 https://registry.npmjs.org/vsce 604ms (from cache)
34 silly pacote registry packument for vsce@^1.69.0 fetched in 641ms
35 http fetch GET 304 https://registry.npmjs.org/rimraf 610ms (from cache)
36 silly pacote registry packument for rimraf@^2.6.2 fetched in 644ms
37 http fetch GET 304 https://registry.npmjs.org/tslint 616ms (from cache)
38 silly pacote registry packument for tslint@^5.11.0 fetched in 652ms
39 http fetch GET 304 https://registry.npmjs.org/@angular-devkit%2fschematics-cli 644ms (from cache)
40 silly pacote registry packument for @angular-devkit/schematics-cli@^0.803.20 fetched in 669ms
41 http fetch GET 304 https://registry.npmjs.org/eslint 642ms (from cache)
42 silly pacote registry packument for eslint@^5.13.0 fetched in 676ms
43 http fetch GET 304 https://registry.npmjs.org/@angular%2fcli 660ms (from cache)
44 silly pacote registry packument for @angular/cli@^8.3.20 fetched in 693ms
45 http fetch GET 304 https://registry.npmjs.org/typescript 676ms (from cache)
46 silly pacote registry packument for typescript@^3.5.3 fetched in 732ms
47 verbose stack TypeError: Cannot read property 'length' of undefined
47 verbose stack     at dotindex (C:\PROGRA~1\nodejs\node_modules\npm\node_modules\text-table\index.js:59:32)
47 verbose stack     at C:\PROGRA~1\nodejs\node_modules\npm\node_modules\text-table\index.js:11:21
47 verbose stack     at Array.forEach (<anonymous>)
47 verbose stack     at forEach (C:\PROGRA~1\nodejs\node_modules\npm\node_modules\text-table\index.js:73:31)
47 verbose stack     at C:\PROGRA~1\nodejs\node_modules\npm\node_modules\text-table\index.js:10:9
47 verbose stack     at Array.reduce (<anonymous>)
47 verbose stack     at reduce (C:\PROGRA~1\nodejs\node_modules\npm\node_modules\text-table\index.js:63:30)
47 verbose stack     at module.exports (C:\PROGRA~1\nodejs\node_modules\npm\node_modules\text-table\index.js:9:20)
47 verbose stack     at C:\PROGRA~1\nodejs\node_modules\npm\lib\outdated.js:130:16
47 verbose stack     at cb (C:\PROGRA~1\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:47:24)
47 verbose stack     at doIt (C:\PROGRA~1\nodejs\node_modules\npm\lib\outdated.js:381:14)
47 verbose stack     at updateDeps (C:\PROGRA~1\nodejs\node_modules\npm\lib\outdated.js:443:9)
47 verbose stack     at tryCatcher (C:\PROGRA~1\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
47 verbose stack     at Promise.successAdapter [as _fulfillmentHandler0] (C:\PROGRA~1\nodejs\node_modules\npm\node_modules\bluebird\js\release\nodeify.js:23:30)
47 verbose stack     at Promise._settlePromise (C:\PROGRA~1\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:566:21)
47 verbose stack     at Promise._settlePromise0 (C:\PROGRA~1\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
48 verbose cwd G:\
49 verbose Windows_NT 10.0.18363
50 verbose argv "C:\\PROGRA~1\\nodejs\\node.exe" "C:\\PROGRA~1\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "outdated" "-g"
51 verbose node v10.16.3
52 verbose npm  v6.9.0
53 error Cannot read property 'length' of undefined
54 verbose exit [ 1, true ]

When

  • Whenever I run npm outdated -g

Where

  • npm cli

How

npm outdated -g

Current Behavior

  • Show errors

Steps to Reproduce

npm outdated -g

Expected Behavior

  • No error occurred.

Who

  • n/a

References

  • n/a
@fishcharlie
Copy link

This seems to be working in npm v6.13.4. Not sure when this was fixed exactly, but just tested on v6.13.4 and not running into any problems. Running into this problem on npm v6.9.0 tho, so it is reproducible.

I think this can be closed since it's fixed in newer versions.

@darcyclarke darcyclarke added the Bug thing that needs fixing label Oct 30, 2020
@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing
Projects
None yet
Development

No branches or pull requests

3 participants