admin管理员组

文章数量:1334656

I followed this tutorial /tools/cli/setup-local to set up local environment and workspace (Angular).

The npm version was 10.9.0 and node version was 22.11.0

Everything went smoothly until I run this line ng new new_project on my terminal. The problem was like the image attached and I didn't know how to fix this problem (although I asked the ChatGPT for clarification).

Do you know how to fix this problem? Thank you so much!

I followed this tutorial https://angular.dev/tools/cli/setup-local to set up local environment and workspace (Angular).

The npm version was 10.9.0 and node version was 22.11.0

Everything went smoothly until I run this line ng new new_project on my terminal. The problem was like the image attached and I didn't know how to fix this problem (although I asked the ChatGPT for clarification).

Do you know how to fix this problem? Thank you so much!

Share Improve this question edited Nov 20, 2024 at 8:11 JSON Derulo 17.9k11 gold badges57 silver badges75 bronze badges asked Nov 20, 2024 at 7:51 Gia Khánh LêGia Khánh Lê 31 bronze badge 2
  • I cannot reproduce, for me running the same command with the same npm/Node version works – JSON Derulo Commented Nov 20, 2024 at 8:13
  • check your network for any kind of blocker or use --f :) – TechVision Commented Nov 20, 2024 at 8:14
Add a comment  | 

1 Answer 1

Reset to default 0

As of me issue happen due to cache.

npm cache verify

then try:

npm cache clean --force
npm install –g @angular/cli@latest 
ng new <YourProjectName>

本文标签: npmProblems when setting up the environment (Angular)Stack Overflow