Ember CLI Live Reload Not Working

余生长醉 提交于 2019-12-03 02:59:00

I wasn't the only one with this issue and my friend found a solution that works.

Add the following lines to your .ember-cli in the root of your project:

"liveReload": true,
"watcher": "polling"

Once you restart the server, it should watch for changes to your directory.

If you are on Mac then install watchman using brew install watchman instead of npm install watchman.

And if you are using Sublime Text then add below code to your sublime user settings json

Prefences -> Settings - User

{
"folder_exclude_patterns":
    [
        ".svn",
        ".git",
        ".hg",
        "CVS",
        "tmp/class-*",
        "tmp/es_*",
        "tmp/jshinter*",
        "tmp/replace_*",
        "tmp/static_compiler*",
        "tmp/template_compiler*",
        "tmp/tree_merger*",
        "tmp/coffee_script*",
        "tmp/concat-tmp*",
        "tmp/export_tree*",
        "tmp/sass_compiler*",
        "tmp/javascript",
        "tmp/result",
        "tmp/transpiled"
    ]
}

Exit Sublime once and open again. Right now Sublime has a bug which causes conflict with watchman, so above trick might work. Good luck.

Might be simplistic answer, but this was solution I needed
In Windows, run Node cmd in Administrator mode

Check package.json for the below devDependencies ,if not add it.

"ember-cli-inject-live-reload": "^1.3.1"
"ember-cli-styles-reloader": "0.1.8"

and in .ember-cli file add the below configuration,

"liveReload": true,
"host": "0.0.0.0"

(For me it works only after adding host entry).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!