Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.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
Ionic framework 意外重新安装后无法安装或运行Ionic_Ionic Framework - Fatal编程技术网

Ionic framework 意外重新安装后无法安装或运行Ionic

Ionic framework 意外重新安装后无法安装或运行Ionic,ionic-framework,Ionic Framework,我的爱奥尼亚安装和运行正常。 我无意中安装了测试版 npm install ionic@beta 我在没有使用administrator运行CMD的情况下完成了这项工作,之后,ionic命令不再被识别,因此我尝试再次安装ionic,但没有成功,我尝试卸载它,然后再次安装,但也没有成功,安装时出现错误: npm ERR! Windows_NT 10.0.10586 npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Use

我的爱奥尼亚安装和运行正常。 我无意中安装了测试版

npm install ionic@beta
我在没有使用administrator运行CMD的情况下完成了这项工作,之后,ionic命令不再被识别,因此我尝试再次安装ionic,但没有成功,我尝试卸载它,然后再次安装,但也没有成功,安装时出现错误:

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\{user}\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v6.9.4
npm ERR! npm  v4.1.1
npm ERR! path C:\Users\{user}\AppData\Roaming\npm\node_modules\.staging\ansi-313f575d
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\{user}\AppData\Roaming\npm\node_modules\.staging\ansi-313f575d' -> 'C:\Users\{user}\AppData\Roaming\npm\node_modules\ionic\node_modules\cordova-lib\node_modules\ansi'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\{user}\AppData\Roaming\npm\node_modules\.staging\ansi-313f575d' -> 'C:\Users\{user}\AppData\Roaming\npm\node_modules\ionic\node_modules\cordova-lib\node_modules\ansi'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.

这个问题是因为在没有管理员权限的情况下安装beta版本时,它在用户范围中创建了PATH变量,该变量仅指向npm目录,并且该变量覆盖了系统PATH变量,因此CMD使用用户范围变量,从而导致ionic安装失败

删除用户的作用域路径变量并重新安装爱奥尼亚解决了此问题