Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grunt-init is not added to PATH #29

Closed
MarcelloDiSimone opened this issue Dec 29, 2012 · 5 comments
Closed

grunt-init is not added to PATH #29

MarcelloDiSimone opened this issue Dec 29, 2012 · 5 comments

Comments

@MarcelloDiSimone
Copy link

When installing grunt-init, it is not added to the PATH as said in the documentation. Installing it as a regular user or with sudo makes no difference. I check /etc/paths, /etc/paths.d/ and ~/.bash_profile but there's no new entry added.

There is no bin folder in /usr/local/lib/node_modules/grunt-init and thus no symlink in /usr/local/bin or /usr/local/lib/node_modules/.bin to start the grunt-init task.

I'm working on a Mac, but apparently it seems to be also on Windows, as a new post on stackoverflow implies: http://stackoverflow.com/questions/14071915/grunt-init-not-recognised-added-to-path-windows

Just to say: I use dotfiles (http://dotfiles.github.com) and chown'ed the /usr/local/lib/node_modules to be owned by my user. These are the two things I can think off, that might relate with this issue.

@shama
Copy link
Member

shama commented Dec 29, 2012

Try npm cache clean and then reinstalling: npm install grunt-init -g.
What does npm ls grunt* -g say?

@MarcelloDiSimone
Copy link
Author

When installing grunt-init as you said, npm ls ... returns

/usr/local/lib
└── grunt-init@0.1.0

But I figured out it is because that normal npm install grunt-init -g installs version 0.1.0 that does not have the bin directory... when running npm install grunt-init@0.2.0rc3 -g the grunt-init task has the bin directory and thus is added correctly to the path (aka. added to usr/local/bin) So the ls returns now

/usr/local/lib
└── grunt-init@0.2.0rc3

...and grunt-init can be executed in the console. Fine!

Is there a npm setting or such, to always install the latest stuff, or development packages.... like in this case?

@shama
Copy link
Member

shama commented Dec 29, 2012

Ah I see, glad it's working for you now. FWIW, this won't be an issue once Grunt v0.4 is released ;)

AFAIK, there isn't a way with npm as it can't tell which version is which. If the author uses tags, you could do npm install grunt@devel but it appears grunt-init dev versions are not tagged. You can install via git with npm though: npm install git://github.com/gruntjs/grunt-init which will install from the master branch of the repo.

@shama shama closed this as completed Dec 29, 2012
@MarcelloDiSimone
Copy link
Author

I would recommend to update the documentation to be more specific on this issue.... or is it only me who's so dopey to run into something like this?

@shama
Copy link
Member

shama commented Dec 30, 2012

Fairly soon the release candidate will be released as latest and the current documentation will become correct. It's just a work in progress atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants