npm outdated error Cannot read property 'length' of undefined
Appears to be fixed in the next release, which isn't out yet.
https://github.com/npm/cli/pull/173
You can install the pre-release to fix it.
npm -g i npm@next
Update
NPM 6.9.2 is out
npm install -g npm
There is a bug in the npm, but you can easily fix it:
- Go to your
npm
folder (i.e./usr/local/lib/node_modules
) and find aoutdated.js
file (i.e./usr/local/lib/node_modules/npm/lib/outdated.js
for Mac orC:\Users\YOUR_USER_NAME\AppData\Roaming\npm\node_modules\npm\lib\outdated.js
for Windows) Find a function
makePretty
and changedeppath
to
deppath || 'global'
in my case it was line #152
I hope it helps! ð