cordova cli安装错误 [英] cordova cli installation error

查看:318
本文介绍了cordova cli安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试更新我的离子cordova cli当我开始得到问题安装两个包,但现在离子已成功安装,我已经尝试安装cordova现在,所有尝试都不成功
这是错误消息正在获取

I try updating my ionic cordova cli when i started getting issues installing the two package, but now ionic have been successfully installed and i have tried installing the cordova now, all attempt was not successful This is the error message am getting

$ npm install -g cordova
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! file C:\Users\Akinsanya Olanrewaju\AppData\Roaming\npm-cache\cordova-js
\3.7.3\package\package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Unexpected token
npm ERR! File: C:\Users\Akinsanya Olanrewaju\AppData\Roaming\npm-cache\cordova-j
s\3.7.3\package\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! Please include the following file with any support request:
npm ERR!     f:\npm-debug.log

请帮助我,项目,也许任何其他来源的安装cordova在我的机器,除了npm将赞赏或任何方式来解决这个问题。

Please i need you help as am in the middle of a project, maybe any other sources of installing cordova on my machine except from npm will be appreciated or any ways to fix this issues.

谢谢。

推荐答案

我只想给Swaminathan Vetri的建议添加一个正式答案。这是我做了什么来解决:

I just want to add an official answer to Swaminathan Vetri suggestion. Here's exactly what I did to resolve:

sudo npm cache clean 确保运行sudo

,然后

sudo npm install -g cordova 确保使用sudo运行。

sudo npm install -g cordova again make sure to run with sudo.

谢谢!

这篇关于cordova cli安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆