cb() never called! when npx create-react-app

I encountered the error cb() never called! when creating new react-app by using npm. attached the log below. I’ve already reinstalled and upgraded the nodejs and npm to the latest version. Thanks.

2019-02-26T08_07_51_790Z-debug.log (708.8 KB)

Thanks for the log. For reports under #bugs please follow the template, which includes more information. (#support is more freeform.)

Were there any other errors displayed on the command line? (I did not see any other errors in the logs.)

Thanks John.

Copied the error log below.

Creating a new React app in C:\Temp\ReactSamples\test-app1.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts…

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\devjcmtsang\AppData\Roaming\npm-cache_logs\2019-02-28T04_09_44_351Z-debug.log

Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.

Deleting generated file… package.json
Deleting test-app1/ from C:\Temp\ReactSamples
(node:25336) UnhandledPromiseRejectionWarning: Error: EBUSY: resource busy or locked, rmdir ‘C:\Temp\ReactSamples\test-app1’
at Object.rmdirSync (fs.js:680:3)
at rmdirSync (C:\Users\devjcmtsang\AppData\Roaming\npm-cache_npx\25336\node_modules\create-react-app\node_modules\fs-extra\lib\remove\rimraf.js:276:13)
at Object.rimrafSync [as removeSync] (C:\Users\devjcmtsang\AppData\Roaming\npm-cache_npx\25336\node_modules\create-react-app\node_modules\fs-extra\lib\remove\rimraf.js:252:7)
at getPackageName.then.then.then.catch.reason (C:\Users\devjcmtsang\AppData\Roaming\npm-cache_npx\25336\node_modules\create-react-app\createReactApp.js:473:12)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:25336) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:25336) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Thanks, that gives a bit more context. I haven’t got a suggestion from that but I’ll ask for one more piece of info which might help others. Would you please also add output from

npm --versions

Here the versions. Thanks.

{ npm: ‘6.8.0’,
ares: ‘1.15.0’,
cldr: ‘33.1’,
http_parser: ‘2.8.0’,
icu: ‘62.1’,
modules: ‘64’,
napi: ‘3’,
nghttp2: ‘1.34.0’,
node: ‘10.15.1’,
openssl: ‘1.1.0j’,
tz: ‘2018e’,
unicode: ‘11.0’,
uv: ‘1.23.2’,
v8: ‘’,
zlib: ‘1.2.11’ }

1 Like

I am having this same issue using npm version ‘6.9.0’ . Any help would be greatly appreciated.

same here as well nodejs 12, npm 6.9 ubuntu 19.04

@jessespurlin @Casper0513
When you say same issue, does that include seeing EBUSY in errors? (Or that you are also having a problem with npm create-react-app but details may be different.)

I had the same issue also. I solved it by running npm install with sudo permission. npm 6.9.0, ubuntu 18.04.2. The following is the log file

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/node’,
1 verbose cli ‘/usr/local/bin/npm’,
1 verbose cli ‘install’,
1 verbose cli ‘react-bootstrap’,
1 verbose cli ‘bootstrap’ ]
2 info using npm@6.9.0
3 info using node@v8.10.0
4 verbose npm-session 4cc1bd7cee7ff639
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://registry.npmjs.org/bootstrap 266ms
8 silly fetchPackageMetaData error for bootstrap@latest EACCES: permission denied, open ‘/home/jayjay/.npm/_cacache/index-v5/0c/11/f1421a77b0de37fac0b54724205319fc703915eca9465bccf89c0828696b’
9 timing npm Completed in 1928ms
10 error cb() never called!
11 error This is an error with npm itself. Please report this error at:
12 error https://npm.community

$ npm ci
npm ERR! cb() never called!

Running with gitlab-runner 11.10.1 (1f513601)
Using Docker executor with image node:11.15.0-alpine …


image: node:11.15.0-alpine
  - init

  stage: init
    - npm ci

I just had this exactly issue when trying to install the Sage theme for WordPress. When I ran npm install on the theme directory, it failed.

Looking in the dependencies in package.json , I could see that the engine I was running for Node was out of date. Running node -v on the command line showed that I was on v0.10.9, and the latest version of Sage requires >= 0.12.0

So here’s the fix for that. These steps are from David Walsh’s blog

  1. Clear your npm cache: sudo npm cache clean -f
  2. Install the latest version of the Node helper: sudo npm install -g n
  3. Tell the helper (n) to install the latest stable version of Node: sudo n stable

You should then get a progress display, after which you will be up to date.

When I ran npm install after doing this, everything worked fine, and I was able to run gulp to build the initial dist directory.

1 Like