[英]'ng' is not recognized - Running an Angular app via electron
I know this question has been asked already, but the reply was not helpful to me. 我知道已经问过这个问题了,但是答复对我没有帮助。
I try to run an Angular app in electron by typing in Visual Studio code integrated terminal the following command: npm start 我尝试通过在Visual Studio代码集成终端中键入以下命令来在电子中运行Angular应用程序:npm start
The error I get is: 'ng' is not recognized as an internal or external command, operable program or batch file. 我得到的错误是:无法将“ ng”识别为内部或外部命令,可操作程序或批处理文件。
The log file looks as following: 日志文件如下所示:
Now: 现在:
Running command node -v gives me - v8.9.4 运行命令节点-v给我-v8.9.4
I have angular Cli inatalled. 我对Cli没兴趣。 Running the command npm list @angular/cli gives me: `-- @angular/cli@6.0.3
运行命令npm list @ angular / cli给我:`-@ angular / cli @ 6.0.3
I went to the folder of Environment Variable The PATH variable looks as following: 我转到了“环境变量”文件夹。PATH变量如下所示:
C:\\users\\dim\\AppData\\Roaming\\npm\\node_modules\\@angular\\cli\\bin;C:\\Program Files (x86)\\Microsoft VS Code\\bin C:\\ users \\ dim \\ AppData \\ Roaming \\ npm \\ node_modules \\ @angular \\ cli \\ bin; C:\\ Program Files(x86)\\ Microsoft VS Code \\ bin
What else can I do in order to solve the issue? 为了解决该问题,我还能做什么?
Your PATH variable should not contain C:\\users\\dim\\AppData\\Roaming\\npm\\node_modules\\@angular\\cli\\bin
but C:\\users\\dim\\AppData\\Roaming\\npm
. 您的PATH变量不应包含
C:\\users\\dim\\AppData\\Roaming\\npm\\node_modules\\@angular\\cli\\bin
而应包含C:\\users\\dim\\AppData\\Roaming\\npm
。
Here are the .cmd
files that are created when you install libraries globally : 以下是在全局安装库时创建的
.cmd
文件:
npm i -g @angular/cli@latest
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.