Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js ';ng';不被识别为内部或外部命令,角度教程_Node.js_Angular - Fatal编程技术网

Node.js ';ng';不被识别为内部或外部命令,角度教程

Node.js ';ng';不被识别为内部或外部命令,角度教程,node.js,angular,Node.js,Angular,我正在做。当我开始运行以下程序时 ng new angular-cosmosdb -sd src/client --minimal --style scss 当我可以确认Angular已全局安装时,我会收到错误消息“ng未被识别为内部或外部命令”,如下所示 我在这里尝试过解决方案 即 o使用-g参数重新安装angular(即使已在全局安装) o重新启动,重新启动,一次又一次地重新启动笔记本电脑 o我怀疑可能需要设置局部变量?但除此之外 list命令的输出为: C:\2017\12 Decem

我正在做。当我开始运行以下程序时

ng new angular-cosmosdb -sd src/client --minimal --style scss
当我可以确认Angular已全局安装时,我会收到错误消息“ng未被识别为内部或外部命令”,如下所示

我在这里尝试过解决方案

o使用-g参数重新安装angular(即使已在全局安装) o重新启动,重新启动,一次又一次地重新启动笔记本电脑 o我怀疑可能需要设置局部变量?但除此之外

list命令的输出为:

C:\2017\12 December\04122017\project>npm list -g --depth=0
D:\Users\useradmin\AppData\Roaming\npm
+-- @angular/cli@1.5.5
`-- typescript@2.6.2

如果在Windows中遇到这种情况,请尝试将路径设置为

set PATH=%PATH%;C:\Users\[YOUR_WINDOWS_USER_NAME\AppData\Roaming\npm;
如果您在OSX中使用它

export PATH=/usr/local/share/npm/bin:$PATH
这将使
ng
命令工作