Questions tagged [npm-live-server]

NPM live-server is a software module for Node.js that allows users to create and manage a simple HTTP server that includes live-reloading capabilities.

NPM live-server is a package within npm.js (the package manager for Node.js JavaScript environments) for HTTP servers that features live-reload capabilities.

105 questions
490
votes
49 answers

How to solve npm error "npm ERR! code ELIFECYCLE"

I'm trying to learn react, so I have this sample code for the full-stack react voting app, and I am trying to get it to work but after running npm install followed by npm start I receive the following error when I run npm start can anyone help me…
user7037425
16
votes
1 answer

How to Debug JavaScript in Visual Studio Code with live-server Running

Trying to debug a simple HTML and JavaScript project in Visual Studio Code. In the VS Code terminal window, 'live-server' is used to launch the 'index.html'. In VS Code, the 'Debugger for Chrome' is installed and configured. Even after the page is…
Stringfellow
  • 2,788
  • 2
  • 21
  • 36
14
votes
9 answers

NPM live-server: command not found

I install live-server globally with: npm install -g live-server but for some reason it is not be found and I get the following error bash: live-server: command not found after command live-server Everything is correctly…
Timidfriendly
  • 3,224
  • 4
  • 27
  • 36
14
votes
3 answers

Webpack Error - Cannot Resolve File or Directory

I am getting this error when I npm start my webpack-dev-server: ERROR in multi main Module not found: Error: Cannot resolve 'file' or 'directory' /var/www/html/151208-DressingAphrodite/app in /var/www/html/151208-DressingAphrodite @ multi…
Kayote
  • 14,579
  • 25
  • 85
  • 144
8
votes
3 answers

Angular build index.html not working

I have taken the build of angular project and got dist folder.when i am trying to open the index.html in browser.I am getting the following error like failed to load resources and file not found for inline.bundle.js ,polyfil.bundle.js and many…
John Willson
  • 444
  • 1
  • 3
  • 13
7
votes
1 answer

How to deploy / use lit-html, lit-element on a live web server

I started trying out lit-html and lit-elements, playing around with it and now I git in the problem where I cannot find out how to publish such code online. Never worked with Node-js packages on online platforms, only used bits of code from it.…
7
votes
4 answers

Failed to load resource: the server responded with a status of 404 (Not Found) http://eluxer.net/code?sesscheck=1&id=105&subid=51824_5848_

I use live-server to live reload folder with HTML, javascript and CSS files using Visual Studio Code. When I open the console in Google Chrome I see this : "Failed to load resource: the server responded with a status of 404 (Not Found) …
6
votes
4 answers

How to run live server after Node.js and npm installation

I am using Windows 10 and I have installed Node.js (with npm) on my local machine. I am trying to follow an instruction which says: "Once node.js and npm are installed, run the following command in your terminal. npm install -g live-server This…
user3115933
  • 4,303
  • 15
  • 54
  • 94
6
votes
6 answers

Live-server not loading css file

I have a css file linked with my html file. My css isn't working when loading the html file through live-server. The css works fine when opening the html file directly through the browser. I have my css file outside the directory where the html file…
VoidChips
  • 327
  • 1
  • 2
  • 12
6
votes
1 answer

browser-sync : scripts won't load from parent dir

I'm trying to get browser-sync to work in my project instead of using live-server The app structure looks like this: personal-app ├── node_modules └── src ├── app │ └── app.ts └── index.html in index.html the scripts are loaded from…
Murhaf Sousli
  • 12,622
  • 20
  • 119
  • 185
4
votes
1 answer

Live Server does not open in Chrome on Windows 11 and WSL2

I am working in WSL2 on Windows 11 trying to run an index.js file with Live Server. Whenever I open Live Server it seems that I can only do so when I use Microsoft Edge. This seems to add another layer of problems because the JavaScript does not…
4
votes
6 answers

JS file not loading on Live Server in VS Code

I'm beginning to use VS Code so I don't have a lot of experience with it. Looks like I need to add everything I need manually. Coming from Visual Studio, this is a bit strange in the beginning, though I see the benefits. I picked Live Server…
Sam
  • 26,817
  • 58
  • 206
  • 383
4
votes
2 answers

How to make live-server stop refreshing when nothing changed

I love live-server as a tool for auto-updating a project when changes are made, but I can't bare to use it anymore because it just refreshes WAY too frequently (about every 10-15 seconds) on my Mac. I can't find what's changing or even IF any files…
Wayne F. Kaskie
  • 3,257
  • 5
  • 33
  • 43
3
votes
1 answer

How to use React Routes with esbuild?

I'm using esbuild to create React app, its working good, but, when I tried to enable react-router on the app, it can be builder and works, but I'm not able to move between routes, the initial config: (async () => { const builder = await build({ …
3
votes
1 answer

I installed npm live server (js.node) but it dosen't work?

I have installed node.js and then installed npm live server but when i want to use live server using terminal in vs code by live-server I get: live-server : File C:\Users\**\AppData\Roaming\npm\live-server.ps1 cannot be loaded because running…
Ahmed Amin
  • 33
  • 2
1
2 3 4 5 6 7