I have grunt, jshint, bower, etc. installed via npm install [x]
on my machine. Each of them is a file visible in C:\Users\Me\AppData\Roaming\npm
.
When I open a Command Prompt and type in jshint, grunt, etc., each of them runs as expected. In addition, my PATH includes C:\Users\Me\AppData\Roaming\npm
.
However, when I run a .bat file that calls any of them, I get 'grunt' is not recognized as an internal or external command, operable program or batch file.
All the other commands (PATH, where grunt) work correctly in the batch file, and even produce the same results.
What might be going wrong?
Specific to this problem:
set PATH=C:\Python26\;C:\Python27\;%PATH%
set PATH=C:\Python26;C:\Python27;%PATH%
Both of these lines will break pathing in a batch file. To get it to work, put the path at the end:
setlocal
set PATH=%PATH%;C:\Python26;C:\Python27
endlocal
(Also, setlocal/endlocal isn't necessary but it's good practice)