question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation npm ERR!

See original GitHub issue

I’m not able to install Ionic via the command line on OSX 10.9.5. Running the command as sudo gives the same results.

$ npm install -g ionic

npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
npm ERR! node v0.10.32
npm ERR! npm  v2.1.7
npm ERR! path /usr/local/lib/node_modules/ionic/.gitattributes
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/ionic/.gitattributes'
npm ERR!  { [Error: EACCES, unlink '/usr/local/lib/node_modules/ionic/.gitattributes']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/local/lib/node_modules/ionic/.gitattributes' }
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/ionic/.gitattributes'
npm ERR! error rolling back  { [Error: EACCES, unlink '/usr/local/lib/node_modules/ionic/.gitattributes']
npm ERR! error rolling back   errno: 3,
npm ERR! error rolling back   code: 'EACCES',
npm ERR! error rolling back   path: '/usr/local/lib/node_modules/ionic/.gitattributes' }
```sh
npm ERR! Please include the following file with any support request:
npm ERR!     /Users/spencerthayer/Desktop/npm-debug.log

Debug Log

57 error argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
58 error node v0.10.32
59 error npm  v2.1.7
60 error path /usr/local/lib/node_modules/ionic/.gitattributes
61 error code EACCES
62 error errno 3
63 error Error: EACCES, unlink '/usr/local/lib/node_modules/ionic/.gitattributes'
63 error  { [Error: EACCES, unlink '/usr/local/lib/node_modules/ionic/.gitattributes']
63 error   errno: 3,
63 error   code: 'EACCES',
63 error   path: '/usr/local/lib/node_modules/ionic/.gitattributes' }
64 error Please try running this command again as root/Administrator.
65 verbose exit [ 3, true ]
66 verbose unbuild lib/node_modules/ionic
67 info preuninstall ionic@1.2.8
68 info uninstall ionic@1.2.8
69 verbose unbuild rmStuff ionic@1.2.8 from /usr/local/lib/node_modules
70 verbose /usr/local/bin,[object Object] binRoot
71 verbose gentlyRm verifying that /usr/local/lib/node_modules/ionic is managed by npm
72 silly isManaged /usr/local/lib/node_modules/ionic is inside /usr/local/lib/node_modules
73 silly gentlyRm /usr/local/lib/node_modules/ionic is managed by npm   
74 silly gentlyRm /usr/local/bin/ionic is not under /usr/local/lib/node_modules/ionic
75 silly gentlyRm checking to see if /usr/local/bin/ionic is a link
76 info postuninstall ionic@1.2.8
77 verbose gentlyRm vacuuming /usr/local/lib/node_modules/ionic
78 silly gentlyRm purging /usr/local/lib/node_modules/ionic
79 error error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/ionic/.gitattributes'
79 error error rolling back  { [Error: EACCES, unlink '/usr/local/lib/node_modules/ionic/.gitattributes']
79 error error rolling back   errno: 3,
79 error error rolling back   code: 'EACCES',
79 error error rolling back   path: '/usr/local/lib/node_modules/ionic/.gitattributes' }

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
drewryghcommented, Nov 15, 2014

Oops 😃 Corrected.

So it still seems to be a permission issue though. That command was for global npm modules, do you have any luck after running:

sudo chown -R whoami /usr/local/lib/node_modules/ionic/

If that doesn’t work try:

sudo npm cache clean sudo npm update -g ionic

and then rerun the permission commands.

1reaction
ghostcommented, Feb 6, 2016

I did sudo -s before running the commands and it worked

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install error from the terminal - Stack Overflow
Running just "npm install" will look for dependencies listed in your package.json. The error you're getting says that you don't have a ...
Read more >
Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. · This can be caused...
Read more >
5 Ways to Fix the Npm Install Not Working Issue
Way 1. Make Sure Npm Is Installed · Way 2. Make Sure There Is a Package.json File · Way 3. Delete Lock File...
Read more >
NPM install error - Material Design for Bootstrap
Trying to install MDB pro 4.19.2 just downloaded and ran npm install but getting this error of sha512 not matching. Can someone tell...
Read more >
How to Solve the Angular NPM Error - C# Corner
The error in NPM, 'error package install failed, see above', can occur when the user creates a new project in Angular using Node.js...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found