cb was not called when installing @babel/core

What I Wanted to Do

I wanted to install @babel/core.

What Happened Instead

I got a log that said:

1064 error cb() never called!
1065 error This is an error with npm itself. Please report this error at:
1066 error <https://npm.community>

Reproduction Steps

git clone git@github.com:MetaMask/metamask-extension.git
cd metamask-extension
git checkout f5614d8d8581cef82ec4f7c0f600c563d134e4c5
npm ci

Some of the verbose logs:

15838 silly tarball trying spdx-license-ids@3.0.3 by hash: sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==
15839 silly extract spdx-expression-parse@3.0.0 extracted to /Users/danfinlay/Documents/Development/ethereum/metamask/plugin/node_modules/ganache-core/node_modules/spdx-expression-parse (8ms)
15840 silly extractTree spdx-exceptions@2.2.0 -> /Users/danfinlay/Documents/Development/ethereum/metamask/plugin/node_modules/ganache-core/node_modules/spdx-exceptions
15841 silly tarball trying spdx-exceptions@2.2.0 by hash: sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==
15842 silly extract is-arrayish@0.2.1 extracted to /Users/danfinlay/Documents/Development/ethereum/metamask/plugin/node_modules/ganache-core/node_modules/is-arrayish (7ms)
15843 silly extract spdx-license-ids@3.0.3 extracted to /Users/danfinlay/Documents/Development/ethereum/metamask/plugin/node_modules/ganache-core/node_modules/spdx-license-ids (6ms)
15844 silly extract spdx-exceptions@2.2.0 extracted to /Users/danfinlay/Documents/Development/ethereum/metamask/plugin/node_modules/ganache-core/node_modules/spdx-exceptions (5ms)
15845 silly extract core-js@2.6.5 extracted to /Users/danfinlay/Documents/Development/ethereum/metamask/plugin/node_modules/ganache-core/node_modules/core-js (780ms)
15846 timing npm Completed in 30153ms
15847 error cb() never called!
15848 error This is an error with npm itself. Please report this error at:
15849 error <https://npm.community>

Details

Node version v10.16.0
NPM version 6.10.0

Platform Info

$ npm --versions
{ 'metamask-crx': '0.0.0',
  npm: '6.10.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',
  icu: '64.2',
  modules: '64',
  napi: '4',
  nghttp2: '1.34.0',
  node: '10.16.0',
  openssl: '1.1.1b',
  tz: '2019a',
  unicode: '12.1',
  uv: '1.28.0',
  v8: '6.8.275.32-node.52',
  zlib: '1.2.11' }
$ node -p process.platform
darwin

I do not know if this is related to your problem, but might affect attempts to reproduce. Your dependencies reference a local file?

    "json-rpc-capabilities-middleware": "file:../temp/json-rpc-capabilities-middleware-0.14.7.tgz",

@danfinlay Yeah, what @shadowspawn said. Iā€™m getting an error because temp/json-rpc-capabilities-middleware-0.14.7.tgz does not exist.

Can you reproduce this on the npm 6.10.2 prerelease? It looks suspiciously related to one of two pacote isues that were recently fixed. Release: 6.10.2-next.0

We identified the source of this problem: We had nested dependencies that depended on different versions of babel, this is more a babel problem than an npm problem as far as we can tell, although a better error message would have helped. You may recognize this:

 babelify@10 requires Babel 7.x (the package '@babel/core'). If you'd like to use Babel 6.x ('babel-core'), you should install 'babelify@8'.

You could consider this issue resolved.

2 Likes