npm Community Forum (Archive)

The npm community forum has been discontinued.

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

issue when installing plotly, got: "npm ERR! cb() never called!"

What I Wanted to Do

Install Plotly with:

npm install --save plotly.js
npm install --save @types/plotly.js

What Happened Instead

Got an error:

npm install --save plotly.js
npm WARN deprecated os-homedir@2.0.0: This is not needed anymore. Use `require('os').homedir()` instead.
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
Unhandled rejection Error: EACCES: permission denied, mkdir '/home/ravn/.npm/_cacache/content-v2/sha1/e0/b1'

npm ERR! cb() never called!

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

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ravn/.npm/_logs/2019-08-11T05_35_01_835Z-debug.log

Reproduction Steps

I’m no NPM expert at all, but according to the text above, sounds like this is all to reproduce. Complete log attached.


Platform Info

$ npm --versions
npm --versions
{ npm: '6.9.0',
  ares: '1.14.0',
  cldr: '32.0.1',
  http_parser: '2.8.1',
  icu: '60.2',
  modules: '57',
  napi: '3',
  nghttp2: '1.32.1',
  node: '8.11.4',
  openssl: '1.0.2n',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.22.0',
  v8: '6.2.414.54',
  zlib: '1.2.11' }

<!-- paste output here -->
$ node -p process.platform
<!-- paste output here -->

I have a complete log, but the system did not allow me to paste it here and I cannot find any attachments…?

The solutions suggested here seemed to solve the issue:

There have been some fixes in recent versions of npm, so if you are also able to update to the latest version of npm then the ownership problem is unlikely to reoccur.

In particular, this version has the fix and the instruction to chown one last time after the npm upgrade: Release: 6.10.2