Not able to change anything in Angular2 application when i create it using Angular CLI

后端 未结 3 1149
时光说笑
时光说笑 2020-12-07 00:26

Using ng serve the project runs in localhost but after changing the code it does not refresh.

Lets say we have the general \"App Works!!\" in the initia

相关标签:
3条回答
  • 2020-12-07 00:32

    The solution for Ubuntu webpack rebuild issue.

    The problem seems to be the inotify max_user_watches :

    sudo echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf
    
    sudo sysctl -p /etc/sysctl.conf
    
    0 讨论(0)
  • 2020-12-07 00:37

    This is a bug within the latest @ngtools/webpack package that the angular-cli uses. To fix this you need to manually downgrade the package:

    npm uninstall @ngtools/webpack
    npm install --save-dev @ngtools/webpack@1.2.4
    

    After a new cli version, you should remove this from your package.json again

    For more information check this bug report

    0 讨论(0)
  • 2020-12-07 00:42

    Had the same problem with Ubuntu 16.04. Quick fix:

    echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
    

    Hope this helps someone!

    0 讨论(0)
提交回复
热议问题