请帮忙 :)
如何在Windows上安装IONIC . 由于某些随机原因,它无法安装 .
我已经安装了Node,NPM和Cordova .
但是当我尝试安装IONIC时出现错误 .
这是我的日志:
所以,问题是我无法安装离子 .
C:\Windows\system32>ionic
'ionic'不被识别为内部或外部命令,可操作程序或批处理文件 .
C:\ Windows \ system32> npm -v
4.4.2
C:\ Windows \ system32> cordova -v
6.5.0
C:\ Windows \ system32> node -v
v6.10.0
C:\Windows\system32>npm install -g ionic
npm WARN弃用minimatch@0.2.14:请更新到minimatch 3.0.2或更高版本以避免RegExp DoS问题
npm WARN弃用minimatch@0.3.0:请更新到minimatch 3.0.2或更高版本以避免RegExp DoS问题
npm WARN弃用minimatch@2.0.10:请更新到minimatch 3.0.2或更高版本以避免RegExp DoS问题
npm WARN不推荐使用node-uuid@1.4.8:改用uuid模块
npm WARN不推荐使用node-uuid@1.3.3:使用uuid模块代替C:\ Users \ jasonbullen \ AppData \ Roaming \ npm` - (空)
npm WARN可选SKIPPING OPTIONAL DEPENDENCY:fsevents@^1.0.0(node_modules \ ionic \ node_modules \ chokidar \ node_modules \ fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:不支持的fsevents平台@ 1.1.1:want {“os”:“darwin”,“arch”:“any”}(当前:{“os”:“win32”,“arch”: “x64”})
npm WARN在ionic@2.2.1中用mime-types @ 2.0.14替换捆绑版本的mime-types
npm WARN在ionic@2.2.1中用semver@4.2.0替换捆绑的semver版本
npm WARN在ionic@2.2.1中用cross-spawn@4.0.2替换捆绑版本的cross-spawn
npm WARN在ionic@2.2.1中用form-data@0.2.0替换form-data的捆绑版本
npm WARN在ionic@2.2.1中用request@2.51.0替换捆绑的请求版本
npm WARN在ionic@2.2.1中用ionic-app-lib@2.2.0替换dop-app-lib的捆绑版本
npm ERR! path C:\Users\jasonbullen\AppData\Roaming\npm\node_modules.staging\ans i-b577a3a1
错误的ERR!代码ENOENT
错误的ERR! errno -4058
错误的ERR!系统调用重命名
错误的ERR! enoent ENOENT:没有这样的文件或目录,重命名'C:\ Users \ jasonbullen \ AppData \ Roaming \ npm \ node_modules.staging \ ansi-b577a3a1' - >'C:\ Users \ jasonbullen \ AppData \ Roaming \ npm \ node_modules \离子\ node_modules \科尔多瓦-LIB \ node_modules \ ANSI”
错误的ERR! enoent ENOENT:没有这样的文件或目录,重命名'C:\ Users \ jasonbullen \ AppData \ Roaming \ npm \ node_modules.staging \ ansi-b577a3a1' - >'C:\ Users \ jasonbullen \ AppData \ Roaming \ npm \ node_modules \离子\ node_modules \科尔多瓦-LIB \ node_modules \ ANSI”
错误的ERR! enoent这很可能不是npm本身的问题
错误的ERR! enoent并且与npm无法找到文件有关 .
错误的ERR! ENOENT
错误的ERR!可以在以下位置找到此运行的完整日志:
错误的ERR! C:\ Users \用户jasonbullen \应用程序数据\漫游\ NPM-cache_logs \ 2017-03-23T09_44_06_598Z-的debug.log
非常感谢 :)
请帮助人 - 它仍然无法正常工作:(
2 回答
更新npm模块并全局安装ionic后,问题可能会解决
如果问题仍然存在
问题参考https://github.com/npm/npm/issues/13323
通过运行添加Windows平台:
或者
将此添加到您的config.xml:
并运行
ionic prepare
在此处查看我的答案:https://stackoverflow.com/a/42815110/5239171