Angular ng new returns package install failed error - compiler.umd.js missing

前端 未结 3 1461
北恋
北恋 2021-01-28 05:17

I am trying to learn Angular and am following an online tutorial. However, I can\'t seem to get past creating a new project with ng new. I am running node v10.16.0 and npm 6.9.0

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-28 06:06

    I've faced like this issue and the solution was:

    1. Go to Edit the system environment variables.
    2. Under User variables for User ==> Path, Make sure C:\Users\user\AppData\Roaming\npm its above all, and make sure you are add current user directory.

    Note: If you don't have current user directory you have to create it.

    3.Under System variables ==> Path, Make sure *C:\Program Files\nodejs* its above all.

    1. Open Command Prompt as user ==> npm cache clean --force.
    2. npm install -g npm@latest.
    3. ng new yourApp.
    4. ng serve --open.

提交回复
热议问题