Sublime Forum

Windows: Basic Build w Grunt ERROR


On a command line at the subdirectory C:\Users\ronni\documents\ronnieroyston I can type “grunt” and grunt runs fine. However, I get the following error when triggering the build in Sublime Text.

ronnieroyston.sublime-build file (shown at bottom) is placed in C:\Users\ronni\AppData\Roaming\Sublime Text\Packages\User

[WinError 2] The system cannot find the file specified
[cmd: grunt]
[dir: C:\Users\ronni\documents\ronnieroyston]
[path: C:\Users\ronni\documents\ronnieroyston]
    "cmd": "grunt",
    "working_dir": "C:\\Users\\ronni\\documents\\ronnieroyston",
    "path": "C:\\Users\\ronni\\documents\\ronnieroyston"


Fixed. I had to add .cmd to the grunt command line argument. I think you need to shut down and restart Sublime Text as well, after you create the .sublime-build file. You need to have the environment variable for node set as well. Working Grunt Builder file below:

  "cmd": "grunt.cmd",
  "working_dir": "C:\\Users\\ronni\\documents\\ronnieroyston"