Angular-CLI ng new: “Error: EPERM: operation not permitted…”

后端 未结 9 1515
死守一世寂寞
死守一世寂寞 2021-01-04 09:53

I am trying to use Angular-CLI to install a new Angular2 app, but keep running into the following issue:

ng new payment-calc-app

After \"Install

相关标签:
9条回答
  • 2021-01-04 10:33
    • Use command: npm install -g @angular/cli --no-optional
    • Close current angular project folder (in this case payment-calc-app)
    • Give parent folder read & write permission & archive permission (right click parent folder & give permissions to folder & child
      folders)
      • Open NodeJs command prompt in administrator mode
      • Run command ng new payment-calc-app
    0 讨论(0)
  • 2021-01-04 10:36

    I had the same problem and the solution that worked for me is running the IntelliJ as an administrator

    0 讨论(0)
  • 2021-01-04 10:37

    In my case the problem was that I had another command prompt with 'ng serve' running, I stopped the process and the creation completed successfully

    0 讨论(0)
  • 2021-01-04 10:39

    if you are getting this type of error when you are trying an ng build --prod

    close VS Code and in file explorer go to the dist folder (same level as the src folder)... manually delete this

    then try again

    0 讨论(0)
  • 2021-01-04 10:41

    I had this same issue. I solved it by rolling back to NodeJS LTS. For me, 11.7 Current was the issue. I combed the inter webs and discovered that Current doesn't get tested with NPM all the time, so in a way, Current is how that team tests NodeJS in the wild. Best of luck to anyone having this issue.

    0 讨论(0)
  • 2021-01-04 10:45

    I know the OP specified they ran it as an Administrator, but for me that solved the issue. Simply running my build as an administrator worked.

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