NPM install -g not working after Titanium install
Asked Answered
W

1

7

I have installed Titanium onto my mac and now when ever I try to globally install any npm packages it fails.

The output from my install is

npm http 304 https://registry.npmjs.org/loggly
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/timespan
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/timespan
/Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/bin/grunt-init -> /Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/lib/node_modules/grunt-init/bin/grunt-init
[email protected] /Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/lib/node_modules/grunt-init
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected])

When I then subsequently do which grunt-init, nothing is returned. It seems like something which is part of Titanium is interfering with my -g npm install?

This only started happening since I installed Titanium. I can get it working if I manually install grunt-init in the npm directory, but this has literally taken away the best feature for me.

please help!

Wristwatch answered 20/11, 2013 at 6:31 Comment(3)
after uninstalling npm, I reinstalled it and still got an issue. looking at the npm log error Error: EACCES, mkdir '/Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/lib' 4 error { [Error: EACCES, mkdir '/Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/lib'] 4 error errno: 3, 4 error code: 'EACCES', 4 error path: '/Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/lib' } 5 error Please try running this command again as root/Administrator.Wristwatch
something is still left in there>!?Wristwatch
Fixed it Ended up completely removing node and npm, then re-installing using nvm. It seems like some permissions issue occurred in the past and hence screwed all my subsequent installs after Titanium. Word of advice nvm seems to be the way forward!Wristwatch
E
20

Try typing:

npm set prefix /usr/local

Then installing again.

Et answered 20/11, 2013 at 17:48 Comment(1)
In my case I used npm set prefix /usr/local/share/npm and worked as wellHieratic

© 2022 - 2024 — McMap. All rights reserved.