cb() never called error while installing angular/cli

while an installation of angular by npm install -g @angular/cli to get an error:

Error at angular/cli installation:

npm ERR! cb() never called!

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

npm ERR! https://github.com/npm/npm/issues

What I Wanted to Do

I want to develop app using angular/cli.

What Happened Instead

but installation of angular/cli itself am getting cb() never called error.

Reproduction Steps

npm install -g @angular/cli

2019-03-02T08_09_02_633Z-debug.log (408.6 KB)

npm version
{ sangitha: β€˜1.0.0’,
npm: β€˜5.4.2’,
ares: β€˜1.10.1-DEV’,
cldr: β€˜32.0’,
http_parser: β€˜2.8.0’,
icu: β€˜60.1’,
modules: β€˜57’,
napi: β€˜3’,
nghttp2: β€˜1.29.0’,
node: β€˜8.11.2’,
openssl: β€˜1.0.2o’,
tz: β€˜2017c’,
unicode: β€˜10.0’,
uv: β€˜1.19.1’,
v8: β€˜6.2.414.54’,
zlib: β€˜1.2.11’ }

$ node -p process.platform
win32

Thanks for details. The log shows an error:

5174 warn tar UNKNOWN: unknown error, open β€˜C:\Users\Sangitha\AppData\Roaming\npm\node_modules.staging\minimatch-3281beaf\LICENSE’

Do other npm installs work, or do they fail in similar way?

You are running an older version of npm and node, and could try updating if you don’t need to stay on that version.

I also have the same error when trying to npm i in a React app.

npm@6.8.0

node@v10.15.2

To be clear @alexlee-dev, when you say the same error do you refer to

warn tar UNKNOWN: unknown error

or just the final error?

error cb() never called!

(The cb() never called is a symptom and not the underlying error, there is usually another error message.)

Ah, I see. I only got the cb() message.

This is a permissions issue. prepend your commands with β€œsudo” (without the quotes)

@Nour The original poster is on Windows, so sudo is not relevant.