2

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..

4

2 回答 2

3

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 grunt-init@0.2.0rc3

At least on Mac it works, but I think it works out on Windows too

于 2012-12-29T22:59:11.670 回答
0

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 grunt-init@0.2.0rc3
于 2013-01-03T20:31:50.747 回答