[英]Angular cli - ng command open the ng file
I have an Angular project and if I want to start the project with 'ng serve' it is opening the ng file from我有一个 Angular 项目,如果我想用 'ng serve' 开始该项目,它会从以下位置打开 ng 文件
C:\\Users{user}\\AppData\\Roaming\\npm\\node_modules\\@angular\\cli\\bin
C:\\Users{user}\\AppData\\Roaming\\npm\\node_modules\\@angular\\cli\\bin
Also, I can start the project with 'npm start'.另外,我可以使用“npm start”启动项目。
The problem was that I use ng in powershell.问题是我在 powershell 中使用了 ng。 In cmd work..
在 cmd 工作中..
Remove path "C:\\Users{user}\\AppData\\Roaming\\npm\\node_modules@angular\\cli\\bin" from Environment variable - path.从环境变量 - 路径中删除路径“C:\\Users{user}\\AppData\\Roaming\\npm\\node_modules@angular\\cli\\bin”。 It worked for me.
它对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.