-1

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!

3

2 Answers 2

4

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.

1
  • Welcome to StackOverflow. However StackOverflow is a very busy site and has therefore strict guidelines for quality answers. Perhaps some people will find your answer somewhat chatty and vague. Please don't take this the wrong way. Others will tell you very directly or even downvote you. You might find it quite harsh, but this is StackOverflow. Please also read stackoverflow.com/help/how-to-answer. Good luck!
    – nalply
    Commented Sep 3, 2015 at 8:27
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.