Quantcast
Viewing latest article 21
Browse Latest Browse All 30

'npm outdated' throw an error (Cannot read property 'length' of undefined)

@FrankSansC wrote:

What I Wanted to Do

npm --global outdated

What Happened Instead

npm info it worked if it ends with ok
npm verb cli [ '/usr/local/Cellar/node/11.10.1/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   '--loglevel=info',
npm verb cli   '--global',
npm verb cli   '--loglevel=verbose',
npm verb cli   'outdated' ]
npm info using npm@6.9.0
npm info using node@v11.10.1
npm verb npm-session 5426802881b6163c
npm http fetch GET 304 https://registry.npmjs.org/csv2json 360ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/qrcode-terminal 353ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/jsonlint 358ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/modbus-serial 360ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/sleep 362ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/wscat 365ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/forever 376ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/winston 370ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/onoff 375ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/ws 375ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/node-gyp 382ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/moment 385ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/js-beautify 391ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/npm-check-updates 390ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/request 392ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/mocha 402ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/serialport 401ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/mqtt 413ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/sinon 415ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/express 426ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/eslint 439ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/npm 450ms (from cache)
npm verb stack TypeError: Cannot read property 'length' of undefined
npm verb stack     at dotindex (/Users/frank/.node/lib/node_modules/npm/node_modules/text-table/index.js:59:32)
npm verb stack     at /Users/frank/.node/lib/node_modules/npm/node_modules/text-table/index.js:11:21
npm verb stack     at Array.forEach (<anonymous>)
npm verb stack     at forEach (/Users/frank/.node/lib/node_modules/npm/node_modules/text-table/index.js:73:31)
npm verb stack     at /Users/frank/.node/lib/node_modules/npm/node_modules/text-table/index.js:10:9
npm verb stack     at Array.reduce (<anonymous>)
npm verb stack     at reduce (/Users/frank/.node/lib/node_modules/npm/node_modules/text-table/index.js:63:30)
npm verb stack     at module.exports (/Users/frank/.node/lib/node_modules/npm/node_modules/text-table/index.js:9:20)
npm verb stack     at /Users/frank/.node/lib/node_modules/npm/lib/outdated.js:130:16
npm verb stack     at cb (/Users/frank/.node/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
npm verb stack     at outdated_ (/Users/frank/.node/lib/node_modules/npm/lib/outdated.js:221:12)
npm verb stack     at skip (/Users/frank/.node/lib/node_modules/npm/lib/outdated.js:343:5)
npm verb stack     at updateDeps (/Users/frank/.node/lib/node_modules/npm/lib/outdated.js:446:7)
npm verb stack     at tryCatcher (/Users/frank/.node/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
npm verb stack     at Promise.successAdapter [as _fulfillmentHandler0] (/Users/frank/.node/lib/node_modules/npm/node_modules/bluebird/js/release/nodeify.js:23:30)
npm verb stack     at Promise._settlePromise (/Users/frank/.node/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:566:21)
npm verb cwd /Users/frank
npm verb Darwin 17.7.0
npm verb argv "/usr/local/Cellar/node/11.10.1/bin/node" "/usr/local/bin/npm" "--loglevel=info" "--global" "--loglevel=verbose" "outdated"
npm verb node v11.10.1
npm verb npm  v6.9.0
npm ERR! Cannot read property 'length' of undefined
npm verb exit [ 1, true ]
npm timing npm Completed in 3452ms

Platform Info

$ npm --versions

npm info it worked if it ends with ok
npm info using npm@6.9.0
npm info using node@v11.10.1
{ npm: '6.9.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '34.0',
  http_parser: '2.8.0',
  icu: '63.1',
  llhttp: '1.1.1',
  modules: '67',
  napi: '4',
  nghttp2: '1.34.0',
  node: '11.10.1',
  openssl: '1.1.1a',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.26.0',
  v8: '7.0.276.38-node.17',
  zlib: '1.2.11' }
npm timing npm Completed in 143ms
npm info ok
$ node -p process.platform

darwin

Posts: 19

Participants: 13

Read full topic


Viewing latest article 21
Browse Latest Browse All 30

Trending Articles