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 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' }
`````` sh
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' }
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 [email protected]
68 info uninstall [email protected]
69 verbose unbuild rmStuff [email protected] 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 [email protected]
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' }
```
Interesting. Can you try granting yourself write access in the directory where your node modules are?
sudo chown -Rwhoami~/.npm I believe?
Close, the command is: sudo chown -Rwhoami~/.npm
Anyway it doesn't work:
~/Desktop]$ 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!
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' }
It's worth noting that this is one of the only installations I have had trouble with using NPM.
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 -Rwhoami/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.
Any luck? Did this fix the problem?
Assuming no response means this fixed things :)
Closing this, let me know if you're still running into problems.
Thanks. It did.
go to http://npmjs-offline.blogspot.com/p/downloads-package.html for downlad and
how to install http://npmjs-offline.blogspot.com/p/how-to-download-install.html
Helped me, as well. Thank you!
I did sudo -s before running the commands and it worked
As of npm 5 you need npm cache clean --force.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
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 -Rwhoami/usr/local/lib/node_modules/ionic/If that doesn't work try:
sudo npm cache cleansudo npm update -g ionicand then rerun the permission commands.