作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 Ubuntu 上安装风 sails ;
节点-v 0.12.2
和 npm -v 2.7.4。npm install sails
错误;
sails@0.11.0 preinstall /home/ubuntu/sails/node_modules/sails
node ./lib/preinstall_npmcheck.js
Sails.js Installation: Checking npm-version successful
npm WARN deprecated node-switchback@0.0.4: The 'node-switchback' NPM module is now simply 'switchback'. See https://github.com/node-machine/switchback for latest docs.
npm WARN deprecated grunt-lib-contrib@0.7.1: DEPRECATED. See readme:https://github.com/gruntjs/grunt-lib-contrib
npm WARN deprecated node-switchback@0.0.2: The 'node-switchback' NPM module is now simply 'switchback'. See https://github.com/node-machine/switchback for latest docs.
npm WARN optional dep failed, continuing uglify-js@2.3.6
npm ERR! Linux 3.16.0-5-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "sails"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! file /home/ubuntu/.npm/less/1.7.5/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/ubuntu/.npm/less/1.7.5/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/ubuntu/sails/npm-debug.log
npm install less
2.5
最佳答案
错误 code EJSONPARSE
是 package.json
的问题.当您安装一个节点包时,它会存储 package.json
.npm
中的文件文件夹。您的 .npm
中似乎下载了一个损坏的小于 1.7.5 的软件包文件。文件夹。
运行以下命令:
sudo rm -rf /home/ubuntu/.npm/less/1.7.5/
package.json
文件在您的计算机上,以便从 NPM 服务器中提取。现在您可以尝试再次安装 Sails。
关于ubuntu - npm installsails 尝试在 1.7.5 版本安装 less,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29542752/
我在 Ubuntu 上安装风 sails ; 节点-v 0.12.2 和 npm -v 2.7.4。 npm install sails错误; sails@0.11.0 preinstall /hom
我是一名优秀的程序员,十分优秀!