【问题标题】:Unable to update ionic 2 from ionic 1无法从离子 1 更新离子 2
【发布时间】:2017-03-11 04:18:56
【问题描述】:

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

对于更新过程,我参考了这个网址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 cache clean吗?

标签: ionic-framework npm ionic2 npm-install


【解决方案1】:

最后我得到了这个错误答案。 我通过在 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

【讨论】:

    【解决方案2】:

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

    在运行 npm install 之前 - 离子

    这个命令通过 NPM 安装 ionic:

    npm install -g ionic
    

    还有这个更新离子脚本

     ionic lib update
    

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

    【讨论】:

    • npm install -g ionic 不工作@devanshsadhotra
    • 这不起作用,伙计。即使我尝试以管理员身份运行命令提示符,但也无法正常工作。同样的错误@devanshsadhotra
    • @Kumaravel 你能告诉我你的 npm 版本吗?
    • 版本是 3.10.9 @devanshsadhotra
    猜你喜欢
    • 2016-09-30
    • 2017-10-19
    • 1970-01-01
    • 2014-08-05
    • 1970-01-01
    • 2017-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多