简体   繁体   English

由于 ng 问题,Angular 项目没有运行

[英]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.

相关问题 无法识别'ng'-通过电子运行Angular应用 - 'ng' is not recognized - Running an Angular app via electron 由于 ng 文件中的无效字符错误,尝试 angular 时任何 ng 命令都会失败 - ANY ng command will fail when trying angular due to invalid character error in ng file 运行 `ng update @angular/cli @angular/core` 后 `ng serve` 出错,无法为 Angular 项目提供服务 - Error from `ng serve` after running `ng update @angular/cli @angular/core` and unable to serve Angular project 由于长时间运行的SQL过程,Angular的POST而导致Nodejs错误 - Nodejs error due to long running SQL Procedure, POST from Angular 运行“npm start”由于错误而失败 - Angular2 - Running “npm start” fails due to error - Angular2 为我的第一个 angular 应用程序运行“ng serve”时出错 - Getting error while running "ng serve" for my first angular application 在新创建的 Angular 工作区上运行 ng lint 时出错 - Errors running ng lint on newly created Angular workspace 即使对于新/小型项目,Angular8,Ng 服务在我的机器上也很慢 - Angular8, Ng serve is very slow on my machine even for new/small projects 运行protractor-conf.js文件时收到警告:“由于安全性和可用性问题,不推荐使用Buffer()” - getting warning while running protractor-conf.js file:“ Buffer() is deprecated due to security and usability issues” 在没有node.js的情况下设置和运行Angular 4应用程序的问题 - Issues setting up and running an Angular 4 application without node.js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM