【问题标题】:ERR in npm install -g cordovanpm install -g cordova 中的错误
【发布时间】:2016-11-17 19:37:33
【问题描述】:

我尝试在我的系统上安装 Cordova,但出现以下错误:

我能做些什么来解决这个问题?

C:\Users\madt>npm install -g cordova
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\madt\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v7.1.0
npm ERR! npm  v3.10.9
npm ERR! file C:\Users\madt\AppData\Roaming\npm-cache\isarray\1.0.0\package\package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Unexpected token '\u0000' at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: C:\Users\madt\AppData\Roaming\npm-cache\isarray\1.0.0\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!     C:\Users\madt\npm-debug.log

C:\Users\madt>

以前从来没有遇到过这样的问题。

【问题讨论】:

  • "告诉包作者修复他们的 package.json 文件。JSON.parse"

标签: node.js cordova npm npm-install


【解决方案1】:

npm 对您已安装的模块有一个本地缓存,所以可能有一些东西卡在了模块上。试试:

npm cache clean 

它将从缓存文件夹中删除数据。

【讨论】:

  • Tkanks 很多!这有帮助!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-10-29
  • 2017-02-18
  • 1970-01-01
  • 2016-05-29
  • 2018-05-08
  • 1970-01-01
相关资源
最近更新 更多