无法从离子 1 更新离子 2

Unable to update ionic 2 from ionic 1

我正在使用 windows 7 32 位 OS。我已经安装了 ionic v1。 现在我尝试更新 ionic v2 但 ionic v1 现在也不见了。

对于更新过程,我引用了这个 url https://ionicframework.com/docs/v2/intro/installation/

我使用下面的命令升级。

npm install -g ionic cordova

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

这里我无法提交附件,所以view here

命令提示符屏幕截图如下

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

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 ]

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

在 运行 npm 安装之前 - ionic

通过 NPM 安装 ionic 的命令:

npm install -g ionic

和这个更新离子脚本

 ionic lib update

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

我终于得到了这个错误答案。 我通过在 ionic 论坛中提交错误报告解决了这个问题,并从 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