Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPM install -g not working after Titanium install

Tags:

npm

titanium

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!

like image 265
user3011849 Avatar asked Nov 20 '13 06:11

user3011849


People also ask

Why is npm not installing?

The Npm command not found error can appear when you install or upgrade npm. On Windows, the cause of this error could be that a PATH or system variable is not correctly set. The error can also occur if you do not have npm or Node. js installed, have an outdated version, or have permission issues.

Is npm installed automatically with node?

However, as npm automatically installs with the Node.

Does npm install install all packages?

By default, npm install will install all modules listed as dependencies in package. json . With the --production flag (or when the NODE_ENV environment variable is set to production ), npm will not install modules listed in devDependencies .


1 Answers

Try typing:

npm set prefix /usr/local

Then installing again.

like image 92
John Bower Avatar answered Sep 23 '22 04:09

John Bower