Search code examples
node.jsnpm-live-server

live reload not working for live-server@ 0.9.2


For my web application I am using "live-server": "^0.9.2", here's the package json file,

{
  "name": "demoapp",
  "version": "1.0.0",
  "description": "This project contains the samples of the book",
  "scripts": {
    "live": "live-server",
    "start": "npm run live"
  },
  "dependencies": {
    "angular": "^1.5.0",
    "angular-messages": "^1.5.0",
    "angular-route": "^1.5.0",
    "bootstrap": "^3.3.6",
    "jquery": "^2.2.0"
  },
  "devDependencies": {
    "live-server": "^0.9.2"
  }
}

When I am executing command "npm start", live server starts and web page starts @ http://127.0.0.1:8080/

Now, whenever I am changing content for html/css, change detection is not happening and browser content is also not refreshed.

What could be the reason for it? how to resolve it. Thanks!!!

enter image description here


Solution

  • According to the github readme doc, the extension works best if it can find html files which are served by default on the web browser. It may detect changes in the local files that you edit, but rendering them to the browser depends on whether you are editing an html file or not. There has to be a hack for it to work, just not found one yet