首页 > 解决方案 > 术语“node.exe”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称

问题描述

尝试创建 Angular 项目时出现错误。这是我第一次安装 node.js 并且所有的测试都成功了。

PS D:\ASP.NET Core & Angular\AngularAPI> ng new Angular7
& : The term 'node.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling 
of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Nahian\AppData\Roaming\npm\ng.ps1:15 char:5
+   & "node$exe"  "$basedir/node_modules/@angular/cli/bin/ng" $args
+     ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (node.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

环境变量也根据指令设置

在此处输入图像描述

谁能告诉我我错过了什么?

编辑:

我已经安装了 node.js 和 angular

在此处输入图像描述

标签: node.jsangular

解决方案


我认为你错过了pathNodeJs 的。尝试添加路径environment variables


推荐阅读