[英]Angular projects not running due to ng issues
I am getting errors in running angular project.我在运行 angular 项目时遇到错误。 Whenever I run any ng command, it throws error (Please check attached screenshot for your reference).
每当我运行任何 ng 命令时,它都会引发错误(请检查附加的屏幕截图以供参考)。
I have also installed node js but still getting the same error.我也安装了 node js,但仍然出现相同的错误。 This issue happened two days ago and all angular projects are giving this error so, according to my understanding, it is a global issue.
这个问题发生在两天前,所有 Angular 项目都出现了这个错误,所以,据我所知,这是一个全球性问题。
Please guide me how to resolve it as I have spent three days on it but still in vain请指导我如何解决它,因为我已经花了三天时间,但仍然徒劳无功
Thank you谢谢
This is a common Windows issue with npm / Angular (Windows is complaining that another process is using those files in some way).这是 npm / Angular 的常见 Windows 问题(Windows 抱怨另一个进程正在以某种方式使用这些文件)。 Its difficult to really diagnose the exact issue but you could try the following.
很难真正诊断出确切的问题,但您可以尝试以下操作。
1) Close all other windows / operations using the Angular project
1) 使用 Angular 项目关闭所有其他窗口/操作
2) Open an Admin powershell window and re-try the command
2) 打开Admin powershell 窗口并重试该命令
These aren't foolproof but tend to work for me when I have these issues.这些不是万无一失的,但当我遇到这些问题时往往对我有用。 Hope this helps.
希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.