Reputation: 981
I had to modify grunt.cmd because the path for my system was very wrong:
Originally:
%~dp0\Application Data\npm\node_modules\grunt
Which would print:
\\dacwnas\Profiles\<user>\Application Data\npm\Application Data\npm\node_modules\grunt
Running grunt.cmd would throw a cannot find module error. Changing it to %~dp0\node_modules\grunt"
removes the error.
But, running grunt.cmd --version
in windows outputs nothing. It simply pauses for a moment and returns to a blank command line.
I'm running Windows 7 64-bit, and the command line is run as administrator
Upvotes: 7
Views: 4847
Reputation: 363
First, you should have the grunt-cli
package installed globally:
npm install -g grunt-cli
Next, make sure you have grunt
installed in your project folder.
You can do this by:
grunt
is part of your package.json
and run: npm install
npm install grunt
After this, you shouldn't have any trouble running Grunt.
Upvotes: 2
Reputation: 576
Did you install grunt-cli?
My grunt.cmd content looks like that:
:: Created by npm, please don't edit manually.
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\node_modules\grunt-cli\bin\grunt" %*
) ELSE (
node "%~dp0\node_modules\grunt-cli\bin\grunt" %*
)
Upvotes: 1