在DigitalOcean上将Sails.js部署到dokku-alt时,我收到以下错误。安装Sails.js时似乎失败了,但我无法找到有关此错误消息的任何信息。我希望了解此错误消息的含义以及如何解决此问题。谢谢你的帮助!
终端
-----> Building dependencies
No cache available
Installing node modules
npm WARN deprecated grunt-lib-contrib@0.7.1: DEPRECATED. See readme: https://github.com/gruntjs/grunt-lib-contrib
npm WARN optional dep failed, continuing fsevents@0.3.6
> sails@0.11.0 preinstall /tmp/build/node_modules/sails
> node ./lib/preinstall_npmcheck.js
remote: /tmp/buildpacks/heroku-buildpack-nodejs/lib/build.sh: line 166: 104 Killed npm install --quiet --userconfig $build_dir/.npmrc 2>&1
remote: 105 Done | indent
-----> Build failed
WARNING: Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
We're sorry this build is failing! If you can't find the issue in application code,
please submit a ticket so we can help: https://help.heroku.com/
You can also try reverting to our legacy Node.js buildpack:
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v63
Love,
Heroku
To dokku@45.55.65.138:chessrabbit-server
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@12.34.56.789:chessrabbit-server'
我的package.json
{
"name": "test",
"private": true,
"version": "0.0.0",
"description": "a Sails application",
"keywords": [],
"dependencies": {
"async": "^1.3.0",
"connect-mongo": "^0.8.1",
"ejs": "~0.8.4",
"grunt": "0.4.2",
"grunt-browserify": "^3.8.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-coffee": "~0.10.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-cssmin": "~0.9.0",
"grunt-contrib-jst": "~0.6.0",
"grunt-contrib-less": "0.11.1",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-mocha-test": "^0.12.7",
"grunt-react": "^0.12.2",
"grunt-sails-linker": "~0.9.5",
"grunt-shell": "^1.1.2",
"grunt-sync": "~0.0.4",
"include-all": "~0.1.3",
"kaiseki": "^0.5.6",
"lodash": "^3.10.0",
"mocha": "^2.2.5",
"moment": "^2.10.3",
"rc": "~0.5.0",
"sails": "~0.11.0",
"sails-auth": "^1.2.7",
"sails-disk": "~0.10.0",
"sails-hook-babel": "^5.0.1",
"sails-mongo": "^0.11.2",
"stripe": "^3.6.0",
"tracer": "^0.7.4",
"uuid": "^2.0.1"
},
"scripts": {
"debug": "node debug app.js",
"start": "sails lift --prod --port 80"
},
"main": "app.js",
"repository": {
"type": "git",
"url": "git://github.com/henry/test.git"
},
"author": "henry",
"license": ""
}
答案 0 :(得分:1)
问题实际上是我的VPS内存不足。解决方案是简单地添加交换分区。
有关如何添加交换分区的详细指南,请访问:https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04