Rodolfo Alves Rodolfo Alves - 2 months ago 27x
Node.js Question

Fail to start browser sync

I'm new to these things. I just started to learn web development through a free course in Coursera, and I'm having trouble in setting up the development environment.

That's what I did: installed Sublime Text 3, git and node.js. Created a repository on git, a web page with Sublime and committed it to git.

Now I'm trying to start browser sync but I'm getting this:

$ browser-sync start --server --directory --files "*"

[BS] Access URLs:
Local: http: //localhost:3000
External: http: //
UI: http: //localhost:3001
UI External: http: //
[BS] Serving files from: ./
[BS] Watching files...
throw er; // Unhandled 'error' event
Error: spawn cmd ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)

I searched a lot but couldn't find a solution.

Browser isn't synchronizing.


One of the mentors of the course helped me with the solution.

The cause of this error was that it was missing the C:\Windows\System32\ variable in the System Variables. I added it and it solved my problem.