npm Community Forum (Archive)

The npm community forum has been discontinued.

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

error cb() never called

What I Wanted to Do

I am trying to execute npm install. I deleted node_modules and then I entered npm i command. I am getting below error. Why I am getting below errors ? However once I was able to build it success, after deleting the node_module and installed latest version of node I am getting below error.

What Happened Instead

npm WARN deprecated core-js@1.2.7: core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
Unhandled rejection Error: ENOENT: no such file or directory, rename 'C:\app\npm-cache\_cacache\tmp\3e55725a' -> 'C:\app\npm-cache\_cacache\content-v2\sha512\b9\cc\abe9690b5e3c8cb873ed394ab897e9d20318168bbbf840ee74f1e43dadeb271
npm ERR! cb() never called!

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

Reproduction Steps

Not sure, How can I reproduce it. Its a huge react app with lot of npm modules, any advice ?

Based on advice, I removed some private pacakges in package.json , made specific this error. Please find below -

 { "engines": {
    "node": "9.7.1",
    "npm": "5.7.1"
  "scripts": {
    "start": "cross-env NODE_ENV='development' webpack-dev-server --debug --output-pathinfo --hot --config webpack.config.js --watch",
    "start:gulp": "cross-env NODE_ENV='development' gulp dev-server",
    "build": "cross-env NODE_ENV='production' ./node_modules/.bin/webpack --config -p",
    "build:jenkins": "cross-env NODE_ENV='production' JENKINS_ENV='true' ./node_modules/.bin/webpack --config -p",
    "build:dev": "cross-env NODE_ENV='development' ./node_modules/.bin/webpack --config webpack.config.js",
    "build:lint": "./node_modules/.bin/eslint ./WebContent/webapps/**/*.js --config .eslintrc.json --ignore-path .eslintignore; exit 0",
    "build:gulp": "cross-env NODE_ENV='production' ./node_modules/.bin/gulp production",
    "build:gulp-jenkins": "cross-env NODE_ENV='production' JENKINS_ENV='true' ./node_modules/.bin/gulp production",
    "build:gulp-dev": "cross-env NODE_ENV='development' ./node_modules/.bin/gulp default",
    "docs:sass": "./node_modules/.bin/sassdoc ./WebContent/webapps -d ./WebContent/docs/sass -t flippant",
    "docs:js": "./node_modules/.bin/jsdoc ./WebContent/webapps -r -d ./WebContent/docs/js"
  "dependencies": {
   "autoprefixer": "^8.5.0",
    "babel-cli": "^6.26.0",
    "babel-core": "^6.26.3",
    "babel-loader": "^7.1.3",
    "babel-plugin-lodash": "^3.3.2",
    "babel-plugin-syntax-async-functions": "^6.13.0",
    "babel-plugin-syntax-dynamic-import": "^6.18.0",
    "babel-polyfill": "^6.26.0",
    "babel-preset-env": "^1.7.0",
    "babel-preset-minify": "^0.4.3",
    "babel-runtime": "^6.26.0",
    "clipboard": "^2.0.1",
    "copy-webpack-plugin": "^4.5.1",
    "cross-env": "^5.1.5",
    "css-loader": "^0.28.11",
    "csswring": "^6.0.2",
    "eslint": "^4.19.1",
    "extract-text-webpack-plugin": "^3.0.2",
    "fetch-jsonp": "^1.1.3",
    "file-loader": "^3.0.1",
    "fusioncharts": "^3.12.2",
    "glob": "^7.1.2",
    "gulp": "^4.0.0",
    "gulp-babel": "^7.0.1",
    "gulp-concat": "^2.6.1",
    "gulp-connect": "^5.5.0",
    "gulp-if": "^2.0.2",
    "gulp-inject": "^4.3.2",
    "gulp-newer": "^1.4.0",
    "gulp-postcss": "^7.0.1",
    "gulp-rename": "^1.2.3",
    "gulp-replace": "^0.6.1",
    "gulp-rev": "^8.1.1",
    "gulp-rev-format": "^1.0.4",
    "gulp-sass": "^4.0.1",
    "gulp-sourcemaps": "^2.6.4",
    "gulp-uglify": "^3.0.0",
    "gulp4": "^4.0.2",
    "handlebars": "^4.0.11",
    "handlebars-loader": "^1.7.0",
    "highlight.js": "^9.12.0",
    "http-proxy-middleware": "^0.18.0",
    "imagemin-webpack-plugin": "^2.1.5",
    "intersection-observer": "^0.5.1",
    "json-loader": "^0.5.7",
    "livereload-js": "^2.3.0",
    "loader-utils": "^1.1.0",
    "loadjs": "^3.5.4",
    "lodash": "^4.17.10",
    "lodash-webpack-plugin": "^0.11.5",
    "merge2": "^1.2.2",
    "name-all-modules-plugin": "^1.0.1",
    "node-sass": "^4.9.0",
    "postcss-loader": "^2.1.5",
    "properties": "^1.2.1",
    "sass-lint": "^1.12.1",
    "sass-loader": "^7.0.1",
    "sass-variable-loader": "^0.1.2",
    "script-loader": "^0.7.2",
    "sticky-sidebar": "^3.3.1",
    "style-loader": "^0.20.3",
    "tiny-slider": "^2.6.0",
    "uglifyjs-webpack-plugin": "^1.2.5",
    "vue": "^2.5.16",
    "vue-loader": "^14.2.2",
    "vue-material": "^0.8.1",
    "vue-router": "^3.0.1",
    "vue-template-compiler": "^2.5.16",
    "webpack": "^3.12.0",
    "webpack-bundle-analyzer": "^2.13.0",
    "webpack-concat-plugin": "^2.4.2",
    "webpack-notifier": "^1.6.0",
    "whatwg-fetch": "^2.0.4",
    "workbox-build": "^3.2.0",
    "workbox-webpack-plugin": "^3.2.0",
    "write-file-webpack-plugin": "^4.3.2"
  "false": {},
  "private": true,
  "license": "UNLICENSED",
  "devDependencies": {
    "webpack-dev-server": "^2.11.1"

Platform Info

$ npm --versions
$ node -p process.platform

It is a public package? The main point of the reproduce steps is so that other people can run a command to see the error themselves and investigate. It is obviously nice if you can cut it down to a simple case, but that is certainly not required.

You might be able to post just the package.json even if it is a private package, in case something stands out to people.

(There have been a few ENOENT reports over last few months which not have resolved, so it can be a hard problem.)

I’m encountering this issue as well. Here’s a Gist with the error log.

As for dependencies, we have:

  "@types/node": "^11.11.3",
  "ascii-table": "0.0.9",
  "canvas": "github:Automattic/node-canvas#92b192447e9b9ae98da0f801e4e34afdd1dc1ef8",
  "canvas-constructor": "kyranet/canvasConstructor#38750815e17709cb346c2d391f0b86f5f8f95d04",
  "chainfetch": "^1.1.0",
  "discord.js": "discordjs/discord.js#8230255c68b94d68a4e8ffc559a98d08d1a08a7c",
  "driftless": "^2.0.3",
  "erlpack": "github:hammerandchisel/erlpack#674ebfd3439ba4b7ce616709821d27630f7cdc61",
  "fs-nextra": "^0.4.3",
  "get-urls": "^8.0.0",
  "humanize-duration": "^3.15.3",
  "klasa": "dirigeants/klasa#6c443e32ac366beded6c2392d3bb24d56c046f3b",
  "klasa-functions": "KlasaCommunityPlugins/functions#180bb0a3bc2a57ea25612346dd7a1175f0e25d48",
  "klasa-member-gateway": "github:dirigeants/klasa-member-gateway",
  "moment": "^2.22.2",
  "moment-timezone": "^0.5.21",
  "node-fetch": "^2.2.0",
  "performance-now": "^2.1.0",
  "random-puppy": "^1.1.0",
  "rethinkdb-inspector": "^0.3.3",
  "rethinkdb-ts": "^2.4.0-rc.10",
  "rethinkdbdash": "^2.3.31",
   "steamid": "^1.1.0",
  "stripe": "^6.12.1",
  "transliteration": "^1.6.6",
  "typescript": "^3.4.2",
  "uuid": "^3.3.2",
  "veza": "^0.3.1",
  "ws": "^6.0.0"

Do you know what the cause might be?

@vladfrangu There are a variety of causes for “error cb() never called” so your problem may not be the same as the original poster, and in particular you did not see ENOENT. I suggest you open a new topic to hopefully find a solution for your problem. (The dependencies and log file are good info though, please include those again.)

Added package.json, using that we can reproduce the error. Thank you

I tried reproducing on Mac using the package.json, but the install ran to completion for me (with 9 deprecation warnings).

Hopefully someone else has some ideas, and the package.json well be helpful for anyone trying to reproduce the problem, thanks for adding.