【发布时间】:2015-06-15 01:40:43
【问题描述】:
我正在 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
似乎指向的是低于 1.7.5 的旧版本。我可以在 2.5 点 npm install less
我在Sails' github repo 上打开了一个问题。其他细节正在那里开发。
【问题讨论】: