2

I am not very much familiar with Angular. I am generating a new Angular application from CLI but I am getting npm errors.

ubox18@ubox18:~/ng-apps$ ng new techadda
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS
CREATE techadda/README.md (1025 bytes)
CREATE techadda/.editorconfig (246 bytes)
CREATE techadda/.gitignore (629 bytes)
CREATE techadda/angular.json (3825 bytes)
CREATE techadda/package.json (1307 bytes)
CREATE techadda/tsconfig.json (435 bytes)
CREATE techadda/tslint.json (1621 bytes)
CREATE techadda/src/favicon.ico (5430 bytes)
CREATE techadda/src/index.html (295 bytes)
CREATE techadda/src/main.ts (372 bytes)
CREATE techadda/src/polyfills.ts (2841 bytes)
CREATE techadda/src/styles.css (80 bytes)
CREATE techadda/src/test.ts (642 bytes)
CREATE techadda/src/browserslist (388 bytes)
CREATE techadda/src/karma.conf.js (1021 bytes)
CREATE techadda/src/tsconfig.app.json (166 bytes)
CREATE techadda/src/tsconfig.spec.json (256 bytes)
CREATE techadda/src/tslint.json (244 bytes)
CREATE techadda/src/assets/.gitkeep (0 bytes)
CREATE techadda/src/environments/environment.prod.ts (51 bytes)
CREATE techadda/src/environments/environment.ts (662 bytes)
CREATE techadda/src/app/app-routing.module.ts (245 bytes)
CREATE techadda/src/app/app.module.ts (393 bytes)
CREATE techadda/src/app/app.component.css (0 bytes)
CREATE techadda/src/app/app.component.html (1152 bytes)
CREATE techadda/src/app/app.component.spec.ts (1101 bytes)
CREATE techadda/src/app/app.component.ts (212 bytes)
CREATE techadda/e2e/protractor.conf.js (752 bytes)
CREATE techadda/e2e/tsconfig.e2e.json (213 bytes)
CREATE techadda/e2e/src/app.e2e-spec.ts (637 bytes)
CREATE techadda/e2e/src/app.po.ts (251 bytes)
Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/713bc9a4'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/587a6d34'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/d24ecd3c'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/183be234'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/65378392'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/c2e18bc1'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/19e9a26f'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/14846b9a'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/1d1b4940'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/fb3fc3bb'

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>
Package install failed, see above.

Can any one please help to solve this error. I searched and go through this answer: npm ERR cb() never called but this does not work.

2
  • seems to be issue with administrator permission in your computer , try to run the same from nodejs cmd instead of normal cmd or give necessary permission Commented Apr 16, 2019 at 12:24
  • use sudo if you are using Linux or Mac or run as an admin if you are using windows then run command. Commented Apr 16, 2019 at 12:25

2 Answers 2

1

Give ownership to npm like this:

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

or try

sudo chown -R $(whoami) ~/.npm
Sign up to request clarification or add additional context in comments.

Comments

0

Can you try giving npm ownership like this

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.