问题
I have just installed the node version 12.16.1 the LTS and angular cli version 9.0.3. At the time of creating new project with cli all files in root folder are generating but it is stuck at the part of installing node packages.
Is anybody facing the same issue? Please help how can we resolve it.
回答1:
Every time you create a new project the angular suppose to download huge chunks of file of size around 500mb, all the time that is been taken is actually the time taken to download those file in the background. A good internet connection is the solution.
回答2:
- Run command
npm i -g npm@latest
- Run command
npm i -g @angular/cli@latest
It worked for me.
回答3:
I changed directory and then run these command and it worked for me
sudo npm cache clean --force
sudo npm cache verify
sudo npm i npm@latest -g
ng new my-project
Another Solution:
Cancel the installing packages with ctrl+c
and then go to the files of project and run command npm install
This also worked for me
来源:https://stackoverflow.com/questions/60388160/angular-9-ng-new-stuck-at-installing-packages