npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Cannot update to node 8 or later

I want to update to Node 8 using npm but I get an error:

Here is the log file, after I tried to run “sudo npm install -g n” following this article: > 2. Update Node Using a Package Manager:

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’,
1 verbose cli ‘/usr/local/bin/npm’,
1 verbose cli ‘install’,
1 verbose cli ‘-g’,
1 verbose cli ‘n’ ]
2 info using npm@6.6.0
3 info using node@v6.9.2
4 verbose npm-session 9a099f0f4df5cb13
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 timing npm Completed in 889ms
8 error cb() never called!

Thanks for your help!

Hmm, no clues from the log! What was displayed on the command-line?

(There is a hot topic about [crash] npm ERR! cb() never called! which includes instructions on using npm to use a canary build of npm to hopefully see the underlying error.)

So here is what the command line puts:

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/me/.npm/_cacache/content-v2/sha512/2d/b7'
    at Error (native)

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <>

I’ll check your link, thanks!