I installed node.js, and "npm install -g live-server" After that the input of "live-server" in the command line prompt should open up the website that is situated in the current folder, but every time I try to do that, this shows up:
Serving "C:\Users\AAYUSHI\bg-gen" at http://127.0.0.1:8080
events.js:288
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) Emitted 'error' event on
ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) { errno: 'ENOENT', code:
'ENOENT', syscall: 'spawn cmd', path: 'cmd', spawnargs: [ '/c',
'start', '""', '/b', 'http://127.0.0.1:8080' ] }
No browser opens up my website automatically. What do you think is the problem?
I checked system variables one more time and found the cause of the problem: missing C:\\Windows\\System32\\ variable. I added it and that solved my problem
Hope, it help you too.
Most likely issue with opening the browser. Use this option instead: live-server dist --port=3000 --no-browser
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.