无法从离子1更新离子2

时间:2017-03-11 04:18:56

标签: ionic-framework npm ionic2 npm-install

我正在使用Windows 7 32位操作系统。我已经安装了离子v1。 现在我尝试更新离子v2,但离子v1现在也消失了。

对于更新过程,我引用了此网址https://ionicframework.com/docs/v2/intro/installation/

我用bellow命令升级。

npm install -g ionic cordova

但是在命令提示符下最后说登录文件夹请提交。我不知道在哪里提交并找到解决方案。

此处我无法提交附件文件view here

命令提示屏幕截图如下:

ionic 2 update failed

请给我解决方案。我的日志详细信息如下。

133947 warn In ionic@2.2.1 replacing bundled version of ionic-app-lib with ionic-app-lib@2.2.0
133948 verbose If you need help, you may report this error at:
133948 verbose     <https://github.com/npm/npm/issues>
133949 verbose stack Error: ENOENT: no such file or directory, rename 'C:\Users\Kumar\AppData\Roaming\npm\node_modules\.staging\abbrev-976d3b8c' -> 'C:\Users\Kumar\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev'
133949 verbose stack     at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:25:7)
133949 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
133949 verbose stack     at FSReqWrap.oncomplete (fs.js:123:15)
133949 verbose stack
133949 verbose stack Error: ENOENT: no such file or directory, rename 'C:\Users\Kumar\AppData\Roaming\npm\node_modules\.staging\abbrev-976d3b8c' -> 'C:\Users\Kumar\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev'
133949 verbose stack     at Error (native)
133950 verbose cwd C:\Users\Kumar
133951 error Windows_NT 6.2.9200
133952 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic" "cordova"
133953 error node v6.9.2
133954 error npm  v3.10.9
133955 error path C:\Users\Kumar\AppData\Roaming\npm\node_modules\.staging\abbrev-976d3b8c
133956 error code ENOENT
133957 error errno -4058
133958 error syscall rename
133959 error enoent ENOENT: no such file or directory, rename 'C:\Users\Kumar\AppData\Roaming\npm\node_modules\.staging\abbrev-976d3b8c' -> 'C:\Users\Kumar\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev'
133960 error enoent ENOENT: no such file or directory, rename 'C:\Users\Kumar\AppData\Roaming\npm\node_modules\.staging\abbrev-976d3b8c' -> 'C:\Users\Kumar\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev'
133960 error enoent This is most likely not a problem with npm itself
133960 error enoent and is related to npm not being able to find a file.
133961 verbose exit [ -4058, true ]

2 个答案:

答案 0 :(得分:1)

最后我得到了这个错误答案。 我通过在离子论坛中提出错误报告并从speedfl

获得解决方案来修复此问题

here is the solution

或直接回答:

npm uninstall -g cordova
npm uninstall -g ionic

npm install -g cordova@6.3.1 (don't take the latest)
npm install -g ionic

答案 1 :(得分:0)

尝试运行: npm config set registry https://registry.npmjs.org/

在运行npm install - ionic

之前

此命令用于安装离子通过NPM:

npm install -g ionic

这个更新离子脚本

 ionic lib update

您可以参考官方文档http://ionicframework.com/docs/cli/install.html