Reputation: 1862
I'm getting grunt.js setup on a Windows 7 machine. I've got Grunt setup on my %PATH%
, but when I try to execute it, I receive this error:
C:\project>grunt
Access is denied.
However, if I rename the grunt file from grunt.js
to gruntfile.js
and rerun Grunt using the --config
flag, it works:
C:\project>grunt --config gruntfile.js
...Lots of Grunt output...
5 specs, 0 failures in 0.041s.
Done, without errors.
My %PATH%
is setup with follows:
set PATH=.;%NODE_HOME%;%PATH%
Any idea why I'm seeing this "Access is denied" error?
Upvotes: 1
Views: 2331
Reputation: 1862
Grunt's FAQ gives me the solution:
If you're in the same directory as the grunt.js gruntfile, Windows tries to execute that file when you type grunt. So you need to type grunt.cmd instead.
The FAQ just showed a different output than what I was seeing; using grunt.cmd
fixes it.
Upvotes: 4