npm Community Forum (Archive)

The npm community forum has been discontinued.

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

Creating a react js app: npm ERR! cb() never called!

What I Wanted to Do

I wanted to create a react app called react-app by running this command create-react-app react-app

What Happened Instead

The terminal returned an error message:

Unhandled rejection Error: EACCES: permission denied, open ‘/Users/quanvihong/.npm/_cacache/index-v5/cb/f5/5167796b1df601b21f55bcc456b993154cc89759e4da4e7dabdc82aa83ad’

npm ERR! cb() never called!

Reproduction Steps

sudo npm i -g create-react-app
create-react-app react-app


Is this react-app still in its beta versions ? No

2019-09-06T13_26_34_129Z-debug.log (133.2 KB)

Platform Info

$ npm --versions
  package: '1.0.0',
  npm: '6.9.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',
  icu: '64.2',
  llhttp: '1.1.4',
  modules: '72',
  napi: '4',
  nghttp2: '1.38.0',
  node: '12.6.0',
  openssl: '1.1.1c',
  tz: '2019a',
  unicode: '12.1',
  uv: '1.30.1',
  v8: '',
  zlib: '1.2.11'

$ node -p process.platform

Your issue is a known problem with file ownership being broken by past uses of sudo with global installs. This was fixed in: Release: 6.10.2

The quick fix is:

sudo chown -R $USER ~/.npm

If you are able to update npm to avoid the problem happening again, upgrade npm and then run the chown again one last time to fix any issues from the upgrade itself.