Tristan Marr
Tristan Marr

Reputation: 125

Fatal error: spawn cmd ENOENT - Grunt Serve

When i run grunt serve i get this.

Running "browserSync:livereload" (browserSync) task
    [BS] Access URLs:
     ------------------------------------
           Local: http://localhost:9000
        External: http://192.168.1.5:9000
     ------------------------------------
              UI: http://localhost:3001
     UI External: http://192.168.1.5:3001
     ------------------------------------
    [BS] Serving files from: .tmp
    [BS] Serving files from: app
    [BS] Watching files...
    Fatal error: spawn cmd ENOENT

Hello Stackoverflow! I have been trying get the yeoman-angular server running. I have got the server running before but now i keep getting this error.

I believe the major problem here is Spawn cmd ENOENT. I have googled the error but i still have no idea what to do. It seems my Path environment is messed up. Please help!

Upvotes: -1

Views: 2702

Answers (2)

maheshsenni
maheshsenni

Reputation: 782

I had the same problem running browserSync on Windows 7 64-bit.

Just in case if anyone stumbles across the same problem, I had to add %SystemRoot%\system32 to PATH environment variable and it solved the issue. %SystemRoot% usually resolves to C:\Windows\system32 (and it contains cmd.exe).

I remembered this solution from one of the issues in GitHub browser-sync repo. I will update the answer with the issue link, if I find it.

Upvotes: 0

S. Wilson
S. Wilson

Reputation: 41

I had this same error running grunt serve on a 64-bit Windows 7 system. I've never experienced this problem on my Macbook Air. What worked for me was right-clicking and opening the Command Prompt using "Run as Administrator." I was then able to navigate to my project directory and run grunt serve without errors. I noticed that this modified my system path, so I agree that this is probably a path-related issue.

Upvotes: 4

Related Questions