The NodeJS live-server package runs a temporary server displaying any HTML/CSS/JS resources in the current folder. It automatically reloads the page in your browser when any of these files change.
- Verify that Node.js is installed. If you see anything when you run
which npm
in a terminal, it is. If not, follow the instructions at nodejs.org to install. - Install live-server:
npm install -g live-server
- Move your terminal to where your pages live:
cd <path-to-content>
- Start the server:
live-server .
- Open localhost:8080 in a browser.
I am facing an issue with the npm live-server
`events.js:174
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
[... lines matching original stack trace ...]
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)`
Can anybody tell me how I can resolve this!??