Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于ng serve不监听代码刷新的问题 #21

Open
yuHengzi opened this issue Oct 17, 2018 · 2 comments
Open

关于ng serve不监听代码刷新的问题 #21

yuHengzi opened this issue Oct 17, 2018 · 2 comments
Labels
已知的坑,注意避免 已解决 参与者已经有了共识,愿意参与的可继续提问

Comments

@yuHengzi
Copy link

ng serve不监听代码刷新,总是需要重新ng serve才能刷新网页.
在删除node_modules之后又可以监听,重启系统之后又失效!
求解!!!

@tc9011
Copy link

tc9011 commented Oct 17, 2018

如果是Linux系统,一般是项目文件数量大于系统默认监听数量,试试这个里面的方法,增加一下系统监听数量:
ng serve --watch is not watching for code changes

@yuHengzi
Copy link
Author

@tc9011 谢谢,这个问题解决了.在终端执行这段代码就能解决这个问题:
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system

@yuHengzi yuHengzi reopened this Oct 19, 2018
@asnowwolf asnowwolf added 已解决 参与者已经有了共识,愿意参与的可继续提问 已知的坑,注意避免 labels Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
已知的坑,注意避免 已解决 参与者已经有了共识,愿意参与的可继续提问
Projects
None yet
Development

No branches or pull requests

3 participants