Angular CLI wont create new project

前端 未结 11 1235
有刺的猬
有刺的猬 2021-01-19 02:23

I am trying to create a project (named ngadmin) via the angular cli but it throws errors on this command: ng new ngadmin. The errors are:

相关标签:
11条回答
  • 2021-01-19 02:43

    If using Linux, go to home and delete package.json.

    0 讨论(0)
  • 2021-01-19 02:43

    I had the same issue, the thing was I was not closely following along the tutorial I was watching and I tried using the same directory, I used cd .. to move up in the file structure and it worked like a charm, hope this helps!

    0 讨论(0)
  • 2021-01-19 02:47

    Seems like i fixed my problem. I have no idea what happened but i noticed system32 was not in my PATH so i added that and uninstalled and reinstalled the angular-cli package. everything works like a charm now

    0 讨论(0)
  • 2021-01-19 02:48

    I had this problem as well. Here is how I fixed it:

    • Go to package.json
    • Under "Dependencies", find "angular-cli": "^1.0.0-beta.18"
    • Delete this line ("angular-cli": "^1.0.0-beta.18")
    • Save file

    Hope that helps!

    0 讨论(0)
  • 2021-01-19 02:54

    Check in your username folder, if there is package.json and node_module exist. If they are there then delete them.

    Notice: you may have created an angular project in your home/username directory. If you delete them it will work.

    0 讨论(0)
  • 2021-01-19 02:57

    i had the same problem today, I started a fresh project and did

     npm install -save @angular/cli
    

    and received the error. I just renamed the package.json to .json2 temporarily and it worked.

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