Reputation: 2494
I'm on Windows and installed the new grunt using: npm install -g grunt-cli npm install -g grunt-init
grunt-init is the issue here.
If I try to run "grunt-init" in the command console, it is not recognised. Also after restarting the PC it's a nogo. I checked the environment settings and grunt-init is indeed not included. In fact, when checking the node_modules directory (in "C:\Users\\AppData\Roaming\npm\node_modules") I see a directory "grunt-init", but there is no .cmd or other executable whatsoever.
Before I file a bug I wanted to ask here, because it seems that other Windows users have no issues with this..
Upvotes: 2
Views: 2682
Reputation: 11007
FIRST make sure that you do:
npm uninstall -g grunt-init
Double check the following folders to ensure that grunt-init is gone:
[%USERNAME%]\AppData\Roaming\npm
[%USERNAME%]\AppData\Roaming\npm\node_modules
[%USERNAME%]\AppData\Roaming\npm-cache
After this is done, then as @marcello mentioned you should install current version of grunt-init (as of this writing):
npm install -g [email protected]
Upvotes: 0
Reputation: 1653
Apparently version 0.1.0, the version that will be installed by a regular npm install -g grunt-init
is not added to the PATH, because it has no bin
directory. If you install the lates version (currently 0.2.0rc3) it should work as expected. Therefor run:
npm install -g [email protected]
At least on Mac it works, but I think it works out on Windows too
Upvotes: 3