[crash] npm ERR! cb() never called!

Downloaded the lastest copy of Node from https://nodejs.org and installed it. That seems to fix the problem for me.

Node streams. Again. :weary:

I would love to get rid of them, which is impossible :cold_sweat:. I hope async iteration fixes most of the use cases in the future!

I still have this error with: npm/6.7.0 node/v10.14.0 win32 x64":

019-02-07T08:46:13.5653099Z 19142 silly extract rxjs@6.3.3 extracted to D:\a\1\s\Pleegzorg\Pleegzorg.Web\ClientApp\node_modules.staging\rxjs-2c6f881a (31066ms)

2019-02-07T08:46:13.5653150Z 19143 silly extract rxjs@6.3.3 extracted to D:\a\1\s\Pleegzorg\Pleegzorg.Web\ClientApp\node_modules.staging\rxjs-dff26e5b (30988ms)

2019-02-07T08:46:13.5653201Z 19144 silly extract rxjs@6.4.0 extracted to D:\a\1\s\Pleegzorg\Pleegzorg.Web\ClientApp\node_modules.staging\rxjs-df39a7cc (31661ms)

2019-02-07T08:46:13.5653251Z 19145 timing npm Completed in 48242ms

2019-02-07T08:46:13.5653301Z 19146 error cb() never called!

2019-02-07T08:46:13.5653348Z 19147 error This is an error with npm itself. Please report this error at:

2019-02-07T08:46:13.5653399Z 19148 error <https://npm.community>

2019-02-07T08:46:13.5653429Z

2019-02-07T08:46:13.5709871Z ##[error]Error: Npm failed with return code: 1

2019-02-07T08:46:13.5735086Z ##[section]Finishing: npm install

npmError.log (1003,4 KB)

I am still seeing this issue intermittently, but consistently when I run npm dedupe && npm prune && npm install (in a desperate attempt to get jest to work in create-react-app).

Log is attached.

2019-02-08T11_13_31_809Z-debug.log (242.8 KB)

Had this error when attempting to upgrade node, ran command sudo npm install -g n directly after having cleaned the cache ( via running sudo npm cache clean -f)

It appears that it’s a directory access error: Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/Xander/.npm/_cacache/tmp' The directory exists, so I’m not sure why it cannot access the directory

Here’s the error log
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.7.0
3 info using node@v8.9.4
4 verbose npm-session ab30e72da09b5213
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 timing npm Completed in 744ms
8 error cb() never called!
9 error This is an error with npm itself. Please report this error at:
10 error <https://npm.community>

@jakkso I wrote up detailed instructions to hopefully resolve your situation here: Error: while installing http-server on MacOS Mojave 10.14.2

The canonical topic for current EISDIR problems is: Global installs (sudo npm i -g) fail on Mac after 6.5 upgrade. Works fine after 6.4.1 downgrade.

Still getting this error with npm ci, debug log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'ci' ]
2 info using npm@6.7.0
3 info using node@v10.12.0
4 verbose npm-session ad376f23729f63a3
5 info prepare initializing installer
6 verbose prepare starting workers
7 verbose prepare installation prefix: ***
8 verbose prepare using package-lock.json
9 verbose checkLock verifying package-lock data
10 silly tree LogicalTree {
...
6311 silly extractTree kind-of@3.2.2 -> ***
6312 timing npm Completed in 13780ms
6313 error cb() never called!
6314 error This is an error with npm itself. Please report this error at:
6315 error <https://npm.community>

I’m on a Mac and tried all of this and nothing worked. Windows 10 I pulled the same project and all was good.

Had me thinking.

Delete /Users/{ YOUR USERNAME }/.npm folder.

And like that npm install worked! Hope this helps others.

It appears there is some misplaced or unworked permissions issues with some of the libs in .npm.

2 Likes

Hi,

I’m getting the same error with NPM 6.8.0 in Docker. Within a local image it runs fine, but when it comes to Travis, I can’t get rid of this error, with no further logs.

I give you the Travis log:

docker run -it -e "NODE_ENV=test" -e "PORTAL_URL=https://www.kalaxia.com" -e "API_URL=http://kalaxia_nginx" kalaxia/front
6.8.0
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!     /root/.npm/_logs/2019-02-21T11_11_26_681Z-debug.log
m ##### <- What is that ? ##########
> app@1.0.0 test /srv/app
> jest --runInBand
 sh: jest: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! app@1.0.0 test: `jest --runInBand`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the app@1.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-02-21T11_11_27_123Z-debug.log
The command "docker run -it -e "NODE_ENV=test" -e "PORTAL_URL=https://www.kalaxia.com" -e  "API_URL=http://kalaxia_nginx" kalaxia/front" exited with 1.

Just in case, I give you my Docker files:
Dockerfile

FROM node:alpine

WORKDIR /srv/app

COPY . /srv/app
COPY docker-entrypoint.sh /entrypoint.sh

RUN chmod a+x /entrypoint.sh && chown root:root /entrypoint.sh \
    && npm i -g npm

ENTRYPOINT ["/entrypoint.sh"]

docker-entrypoint.sh

#!/bin/sh
npm -v
npm install

if [ "$NODE_ENV" == "production" ]
then
    npm run build &amp;&amp; npm run start
elif [ "$NODE_ENV" == "test" ]
then
    npm run test
else
    npm run dev
fi

Thanks !!! This downgrade also works for me!

I get the same error on a Raspberry (running node-red as a docker):
2019-03-22T16:55:13.733Z Install : node-red-contrib-json 0.2.0

2019-03-22T16:55:15.520Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-json@0.2.0
2019-03-22T16:55:16.612Z [err] npm
2019-03-22T16:55:16.615Z [err]
2019-03-22T16:55:16.618Z [err] info it worked if it ends with ok
2019-03-22T16:55:16.619Z [err] npm info using npm@5.0.3
2019-03-22T16:55:16.619Z [err] npm info using node@v8.1.3
2019-03-22T16:55:19.206Z [err] npm
2019-03-22T16:55:19.208Z [err] ERR! cb() never called!
2019-03-22T16:55:19.208Z [err]
2019-03-22T16:55:19.208Z [err] npm ERR! This is an error with npm itself. Please report this error at:
2019-03-22T16:55:19.208Z [err] npm ERR! https://github.com/npm/npm/issues
2019-03-22T16:55:19.224Z [err]
2019-03-22T16:55:19.225Z [err] npm ERR! A complete log of this run can be found in:
2019-03-22T16:55:19.225Z [err] npm ERR! /usr/src/node-red/.npm/_logs/2019-03-22T16_55_19_212Z-debug.log
2019-03-22T16:55:19.240Z rc=1

I am desperate, I can not add any new nodes to my environment.

@churruscat

The issue this topic is about was fixed in npm 6.6.0 and you are running npm 5.0.3, so I suggest you update to a newer version of npm if you are able.

The “ERR! cb() never called!” generally happens after something else goes wrong. The issue this topic turned out to be about was that the underlying error was not being displayed. So npm 6.6.0 and higher may not actually make the install work, but will hopefully tell what the problem is.

If you need more help I suggest you open a new issue, as this topic is long!

Hello guys, I still have the cb() never called problem when trying to install Parsoid for my mediaWiki, i’m running on Windows, I tried to download the npmc but maybe I don’t know how to use it, here’s my log 2019-03-23T17_23_40_940Z-debug.log (545,5 Ko)

I am getting this with a ProGet registry we have set up. Found a way to repro using docker. You’ll have to fill in some information though regarding a private registry/proxy server

docker run --rm -ti --name tmp --entrypoint sh --privileged node:8.11.4
> mkdir /app
> cd /app
> echo '{
  ..package.json
}
' > /app/package.json
> npm config set \
  @company:registry \
  https://my.npm.registry/npm/
> npm config set strict-ssl false
> npm config set https-proxy https://user:pass@vpn.company.com

I’ve had the same issue with empty project and it turned out to be permission issue. Somehow (maybe after running npm inint) I have lost ownership of the folder which prevented me from running npm install. Install worked with sudo, but as soon as I tried to run npm install or npm ci without sudo it failed again with cb() never called!. I went through several steps of restoring permissions to all node and npm related directories such as:

  • /usr/local/lib/node_modules
  • /usr/local/bin
  • /usr/local/shared
    Then ran DiskUtil First aid to fix permissions (it did find an error and fixed it)
    I also set ownership over my user directory in Users/[myuser]
    Some of these steps fixed an issue for me.

The way I discovered it was a permission issue was running npm cache verify which threw EACCESS errors.

Hope this helps.

2 Likes

This is happening to me too, trying a global install of node-clinic. on MacOS 10.14.4, as root, log says:

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 ‘clinic’ ]
2 info using npm@6.9.0
3 info using node@v8.14.0
4 verbose npm-session b6f0072cf509c5f3
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 timing npm Completed in 1196ms
8 error cb() never called!
9 error This is an error with npm itself. Please report this error at:

1 Like

It worked for me… Thank you very much

1 Like

Hello. I’m completely not js guy and have faced stable way to reproduce the issue:

# Dockerfile
FROM archlinux/base

RUN echo 'Server = http://mirror.easyname.at/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist && \
  pacman -Syu --noconfirm curl tar npm && \
  curl -L https://github.com/UltimateHackingKeyboard/agent/archive/v1.2.12.tar.gz | tar xz && \
  cd agent-1.2.12 && npm -v && npm install

There are installed packages:

Packages (14) bash-5.0.007-1 c-ares-1.15.0-1 glib2-2.60.2-1 iana-etc-20190504-1 icu-64.2-1 libnsl-1.2.0-1 libuv-1.28.0-1 node-gyp-4.0.0-1 nodejs-11.15.0-1 pcre2-10.33-1 semver-6.0.0-1 curl-7.64.1-2 npm-6.9.0-1 tar-1.32-1

The output of npm install is

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!     /root/.npm/_logs/2019-05-11T17_07_29_693Z-debug.log
1 Like

This worked for me. I downgraded to node 8 and npm 5.0.0

1 Like