【发布时间】:2016-05-26 22:09:13
【问题描述】:
使用nodeenv建立节点virtualenv后,我使用source /bin/activate 切换到正确的目录,更新npm,然后执行
npm install -g grunt 或 npm install -g grunt-cli 我收到同样的错误:
npm ERR! Linux 3.13.0-53-generic
npm ERR! argv "node" "/home/{redacted-home-dir}/NodeProjects/vue/bin/npm" "install" "-g" "grunt-cli"
npm ERR! node v0.12.4
npm ERR! npm v2.11.1
npm ERR! file /home/{redacted-home-dir}/.npm/findup-sync/0.1.3/package/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: /home/{redacted-home-dir}/.npm/findup-sync/0.1.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! /home/{redacted-home-dir}/NodeProjects/vue/npm-debug.log
A similar error 被记录在 findup-sync Github 上,但这是 npm 的最新版本。
根据 npm 文档,Grunt 的 package.json 说“大约 0.1.2”。
我也尝试过独立安装 findup-sync,但无济于事。
关于我的计算机的其他详细信息:Linux (Debian/Ubuntu 14.04)。 64位。
【问题讨论】: