简体   繁体   English

使用npm在nodeenv上安装grunt会导致findup-sync错误

[英]Using npm to install grunt on nodeenv results in findup-sync error

After establishing a node virtualenv using nodeenv, I use source /bin/activate to switch into the correct directory, update npm, and execute 在使用nodeenv建立节点virtualenv之后,我使用源/ bin / activate切换到正确的目录,更新npm并执行

npm install -g grunt or npm install -g grunt-cli and I recieve the same error: npm install -g gruntnpm 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 was noted on the findup-sync Github, but this the most recent edition of npm. 在find-sync同步Github上发现了类似的错误 ,但这是npm的最新版本。

Grunt's package.json says "approximately 0.1.2" according to the npm docs. 根据npm文档,Grunt的package.json表示“约0.1.2”。

I also have tried installing findup-sync independently, to no avail. 我也尝试过独立安装findup-sync,但无济于事。

Other details about my computer: Linux (Debian/Ubuntu 14.04). 关于我的计算机的其他详细信息:Linux(Debian / Ubuntu 14.04)。 64bit. 64位。

您的缓存可能已损坏: npm cache clean

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM