Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/470.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/39.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/302.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
Javascript -bash:ng:使用npm-link@angular安装@angular/cli后未找到命令/cli@latest_Javascript_Node.js_Angular_Typescript_Npm - Fatal编程技术网

Javascript -bash:ng:使用npm-link@angular安装@angular/cli后未找到命令/cli@latest

Javascript -bash:ng:使用npm-link@angular安装@angular/cli后未找到命令/cli@latest,javascript,node.js,angular,typescript,npm,Javascript,Node.js,Angular,Typescript,Npm,我正在使用: 节点-v v10.15.3 npm-v 6.4.1 我试过下面提到的命令 命令:npm i-g angular/cli 执行时出错:npm ERR/usr/local/bin/git ls remote-h-t ssh://git@github.com/angular/cli.git 命令:npmi-g@angular/cli npm错误!path/Users/admin/.node\u modules/bin/ng npm ERR!代码EEXIST npm错误!拒绝删除/User

我正在使用:

节点-v v10.15.3

npm-v 6.4.1

我试过下面提到的命令

命令:npm i-g angular/cli

执行时出错:npm ERR/usr/local/bin/git ls remote-h-t ssh://git@github.com/angular/cli.git

命令:npmi-g@angular/cli

npm错误!path/Users/admin/.node\u modules/bin/ng npm ERR!代码EEXIST npm错误!拒绝删除/Users/admin/.node_modules/bin/ng: ../lib/node_modules/angular cli/bin/ng符号链接目标未指定 由npm控制 /Users/admin/.node\u modules/lib/node\u modules/@angular/cli npm ERR!文件 存在:/Users/admin/.node\u modules/bin/ng npm ERR!把它移开,然后 再试一次


您需要尝试使用admin previledge安装angular,并尝试使用-g全局安装它

npm安装-g@angular/cli

安装后,检查角度版本


ng--version

确保您在环境变量->用户变量中有正确的路径,如下所示

在这种情况下,我的npm文件夹位于

C:\Users\phuc.ngo\AppData\Roaming\npm

在npm文件夹中可以找到您安装的所有内容,如angular cli、webpack等。

您可以使用管理员权限进行尝试吗?是的,我也尝试过使用sudo