Angular/CLI — auto reload doesn't happen

后端 未结 11 1826
既然无缘
既然无缘 2020-12-24 13:06

I recently started working with Angular/CLI tool, I\'m facing a problem while executing the file, that is when I run

ng serve 

then this c

11条回答
  •  既然无缘
    2020-12-24 13:27

    I have faced the same issue in my ubuntu machine. It was due to the permission settings. I changed the workspace permission settings by following the below mentioned steps.

    1. Open a terminal window.
    2. Type sudo chmod a+rwx /path/to/file into the terminal, replacing “/path/to/file” with the file you want to give permissions to everyone for, and press “Enter.” You can also use the command sudo chmod -R a+rwx /path/to/folder to give permissions to a folder and every file and folder inside it. Omit the “x” from either command if you don’t want the files to be executable.

    I have used sudo chmod -R a+rwx /path/to/folder.

    1. Type your password at the password prompt and press “Enter.”

    Once it is done, do npm build and start the application by ng serve.

    [OR]

    Simply you can use "sudo ng serve".

    Now do the necessary changes in the workspace files and without restart, auto-reload happens. Hope this would be helpful!

提交回复
热议问题