Closed davidchase closed 9 years ago
Which OS are you using? Do you have other globally installed modules that work? It sounds like the npm directory is not in your path environment variable.
OS X 10.10.3
and i have a lot of other globally installed modules that work, also npm directory is in my path...
I'm not currently near an OS X machine to test on at the moment but there is no reason it shouldn't work. Did you receive any errors while installing the module?
Nope no errors, installed just fine.. asked a friend of mine to try and install the cli
same issue
Until I can get to an OS X machine, the best I can provide at the moment is: http://stackoverflow.com/questions/14803978/npm-global-path-prefix
It seems like this is an issue with npm. There is nothing special this module does for installing globally, npm handles all of that and the stack overflow article shows some resolutions to it. I will respond back within the next day or so of my findings. Thanks!
Thanks for looking into it no worries
Same issue here, however I doubt it has anything to do with the Stackoverflow answer. It seems this is because on Windows machines the newline is \r\n
while on Unix systems it's only \n
.
In your bin/modclean.js
the first line #!/usr/bin/env node
is interpreted by Unix systems as #!/usr/bin/env node\r
, thus resulting in the error.
The solution is to remove the \r
in your bin file.
You're completely right. I thought I had it set to use Unix new lines but I guess it wasn't. I will fix that and get the module updated soon. Thanks for your investigation!
After some trial and error, I fixed this issue and released it as version 1.1.2 to npm. I've tested it on OS X Yosemite and it's working as expected when installed globally. Feel free to reopen if there are any other issues related to this.
:+1:
After doing
npm install -g modclean
and runningmodclean
it throwsenv: node\r: No such file or directory