npm Community Forum (Archive)

The npm community forum has been discontinued.

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

Getting an error code and idk what to do

I found a tutorial to teach Angular on Youtube. I’m following along and I got to the part where I do some terminal stuff and I’m getting an error. I’ve pasted the contents of the terminal below. It said to come here for help. So here I am. Thanks you guys.

ng new angular-crash-todolist

? Would you like to add Angular routing? Yes

? Which stylesheet format would you like to use? CSS (.css )

CREATE angular-crash-todolist/ (1037 bytes)

CREATE angular-crash-todolist/.editorconfig (246 bytes)

CREATE angular-crash-todolist/.gitignore (629 bytes)

CREATE angular-crash-todolist/angular.json (3951 bytes)

CREATE angular-crash-todolist/package.json (1321 bytes)

CREATE angular-crash-todolist/tsconfig.json (435 bytes)

CREATE angular-crash-todolist/tslint.json (1621 bytes)

CREATE angular-crash-todolist/src/favicon.ico (5430 bytes)

CREATE angular-crash-todolist/src/index.html (307 bytes)

CREATE angular-crash-todolist/src/main.ts (372 bytes)

CREATE angular-crash-todolist/src/polyfills.ts (2841 bytes)

CREATE angular-crash-todolist/src/styles.css (80 bytes)

CREATE angular-crash-todolist/src/test.ts (642 bytes)

CREATE angular-crash-todolist/src/browserslist (388 bytes)

CREATE angular-crash-todolist/src/karma.conf.js (1035 bytes)

CREATE angular-crash-todolist/src/ (166 bytes)

CREATE angular-crash-todolist/src/tsconfig.spec.json (256 bytes)

CREATE angular-crash-todolist/src/tslint.json (244 bytes)

CREATE angular-crash-todolist/src/assets/.gitkeep (0 bytes)

CREATE angular-crash-todolist/src/environments/ (51 bytes)

CREATE angular-crash-todolist/src/environments/environment.ts (662 bytes)

CREATE angular-crash-todolist/src/app/app-routing.module.ts (245 bytes)

CREATE angular-crash-todolist/src/app/app.module.ts (393 bytes)

CREATE angular-crash-todolist/src/app/app.component.css (0 bytes)

CREATE angular-crash-todolist/src/app/app.component.html (1152 bytes)

CREATE angular-crash-todolist/src/app/app.component.spec.ts (1143 bytes)

CREATE angular-crash-todolist/src/app/app.component.ts (226 bytes)

CREATE angular-crash-todolist/e2e/protractor.conf.js (752 bytes)

CREATE angular-crash-todolist/e2e/tsconfig.e2e.json (213 bytes)

CREATE angular-crash-todolist/e2e/src/app.e2e-spec.ts (651 bytes)

CREATE angular-crash-todolist/e2e/src/app.po.ts (251 bytes)

Unhandled rejection Error: EACCES: permission denied, open ‘/Users/ericlucko/.npm/_cacache/index-v5/1c/d9/c780757f8f83ec2c4b106694c6dda982d44276828821e79c66b5f2092953’

Unhandled rejection Error: EACCES: permission denied, open ‘/Users/ericlucko/.npm/_cacache/index-v5/51/0a/84f22c2f691dcb4c520cf9fce884e911be1c8f1b1cd29848cbbbaf2dc51d’

Unhandled rejection Error: EACCES: permission denied, open ‘/Users/ericlucko/.npm/_cacache/index-v5/1c/d9/c780757f8f83ec2c4b106694c6dda982d44276828821e79c66b5f2092953’

Unhandled rejection Error: EACCES: permission denied, open ‘/Users/ericlucko/.npm/_cacache/index-v5/e6/95/fa9c994121ed142a2e5d4f1ac42e1b494f767340cb6ba4e34f0f31facc9d’

npm ERR! cb() never called!

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

npm ERR! <>

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/ericlucko/.npm/_logs/2019-03-07T22_53_01_836Z-debug.log

Package install failed, see above.

This is likely an ownership issue left behind by using sudo with global installs. The short answer is try:

sudo chown -R $(whoami) ~/.npm

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

Seems to have worked! If I have any more issues, I know exactly where to turn, thank you.