Open dmassiani opened 8 years ago
Hmm, that's weird.
Where is the slush
lib located? What do you get when running:
ls -l `which slush`
Also what does echo $NODE_PATH
give you?
ls -l which slush
lrwxr-xr-x 1 root admin 38 9 mar 10:43 /usr/local/bin/slush -> ../lib/node_modules/slush/bin/slush.js
echo $NODE_PATH : empty
Ok, and what does npm -g root
give you?
I use nvm. /Users/david/.nvm/versions/node/v0.12.7/lib/node_modules
I see, then I think the issue is caused by slush
being installed before nvm
was installed. May that be the case? Try to install slush again with: npm i -g slush
and see if that solves the issue.
Also the next version of Slush will search for modules in the npm -g root
path so then it shouldn't matter if Slush was installed before nvm or not. I haven't had the time to finish that yet though.
Sorry but slush being installer after nvm
There seems to be multiple paths involved here (and multiple NodeJS versions as well):
/usr/local/lib/node_modules/
- which is where slush
is installed (and probably slush-angular
as well) according to ls -l $(which slush)
/Users/david/.nvm/versions/node/v5.0.0/lib/node_modules
- which is where slush-angular-gulp
is installed according to your screenshot/Users/david/.nvm/versions/node/v0.12.7/lib/node_modules
- which is the path that your npm
currently installs global modules to according to npm -g root
So I think you should try this:
node -v
- should show v5.x.xnpm -g root
- should show /Users/david/.nvm/versions/node/v5.0.0/lib/node_modulesnpm i -g slush
/Users/david/.nvm/versions/node/v5.0.0/lib/node_modules/slush
existsls -l $(which slush)
is pointing to bin/slush.js
in the folder in step 3If step 3 is ok but not 4 try to remove the symlink: rm -f /usr/local/bin/slush
and then reinstall slush
, hopefully a final time.
@dmassiani any progress with this?
@joakimbeng sorry, I have many works since few weeks. Before breaking node, I need to finish it :)
@dmassiani no worries, I know how it is!
It looks like slush don't take npm's _
var npm = require("npm")
var myConfigObject = {}
npm.load(myConfigObject, function (er) {
if (er) return handleError(er)
console.log(npm.get('prefix'));
})
I just had the same issue. I started to install slush before I remembered to use NVM with the version of Node I wanted to install. I switched to that version using nvm and installed again. By using the commands above I found that it was finding the version of slush that installed before I switched to the current version of nvm. I removed that one manually, and then everything started working.
Hello,
I install generators globally but slush don't find any generators. I'm using node 5.0 Please see screenshot