When I try to start browser-sync from the command line, I get the following results in the cmd window. I am running a 64 bit win 7 system. Thanks for an y help with this.
D:\Users\Bill\front-end-dev-book\ottergram>browser-sync start --server --browser
"Google Chrome" --files “stylesheets/*.css, *.html”
[BS] Access URLs:
Local: http://localhost:3000
External: http://192.168.1.250:3000
UI: http://localhost:3001
[BS] Serving files from: ./
[BS] Watching files…
events.js:160
throw er; // Unhandled ‘error’ event
^
Error: spawn cmd ENOENT
at exports._errnoException (util.js:1026:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
D:\Users\Bill\front-end-dev-book\ottergram>
Hey there!
This will be a bit of a shot in the dark, but could you try running the Command Prompt as Administrator and then
trying the browser-sync
command?
Thanks for the suggestion! Unfortunately, I was running in Admin mode.
Bill
Hmmm… What I’ve been able to find is this: http://stackoverflow.com/a/37488891/5562062
It suggests adding %SystemRoot%\system32
to the PATH
environment variable.
Can you try that and post the result?
Ok. I think we can get this figured out…!
I have two things to suggest.
The first is the quick and dirty route, just to make sure you can keep working. You could try something like http://www.wampserver.com/en/ to replace browser-sync. Note that if you do, you’ll need to manually reload the browser when you make changes to files.
The second is to follow the info here and install Visual Studio, which provides some system libraries that browser-sync might need: https://www.browsersync.io/docs/#windows-users
In any case, I’m going to try to replicate your setup by running a virtual machine from Microsoft.
Another option is to download the package “open-in-browsers” inside your Atom editor. This will only view static changes. If you want to do stuff with Ajax, I recommend getting MAMP. You can download it and have a server pointing to your directory.