设置package.json以部署到heroku

设置package.json以部署到heroku,heroku,package.json,Heroku,Package.json,我正在尝试设置package.json,以便在heroku上部署 { "name": "caffeine", "version": "0.0.0", "private": true, "scripts": { "postinstall": "bower install", "start": "node app.js" }, "dependencies": { "body-parser": "~1.12.0", "cookie-pars

我正在尝试设置package.json,以便在heroku上部署

   {
  "name": "caffeine",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "postinstall": "bower install",
    "start": "node app.js"
  },
  "dependencies": {
    "body-parser": "~1.12.0",
    "cookie-parser": "~1.3.4",
    "debug": "~2.1.1",
    "express": "~4.12.2",
    "express-session": "^1.11.3",
    "jade": "~1.9.2",
    "moment": "^2.10.3",
    "mongoose": "^4.0.2",
    "morgan": "~1.5.1",
    "node-phantom-simple": "^1.2.0",
    "passport": "^0.2.2",
    "passport-facebook": "^2.0.0",
    "passport-google-oauth": "^0.2.0",
    "passport-local": "^1.0.0",
    "passport-local-mongoose": "^1.0.0",
    "serve-favicon": "^2.2.0",
    "should": "^6.0.3",
    "swig": "^1.4.2"
  },
  "devDependencies": {
    "gulp": "^3.9.0",
    "gulp-jshint": "^1.11.0",
    "gulp-nodemon": "^2.0.3"
  },
  "engines": {
    "node": "0.10.29",
    "npm": "2.1.11"
  }
}
我犯了很多错误。我首先在heroku上进行故障排除。不过,我还是犯了同样的错误。我进入我的git忽略并添加了bower。我添加了一个proc文件。我知道我的包裹里肯定有错误,但我不知道我遗漏了什么

npm ERR! node v0.10.29
remote:        npm ERR! npm  v2.1.11
remote:        npm ERR! code ELIFECYCLE
remote:        npm ERR! caffeine@0.0.0 postinstall: `bower install`
remote:        npm ERR! Exit status 127
remote:        npm ERR! 
remote:        npm ERR! Failed at the caffeine@0.0.0 postinstall script 'bower install'.
remote:        npm ERR! This is most likely a problem with the caffeine package,

在package.json的开发依赖项中,我必须使用

"bower": "1.4.1"
下面的消息解释了heroku团队的注意事项

    This error happens when you try running bower install after installing all you dependencies. However, bower isn't there.
You need to add it to your package.json so the executable is available to your app and you can execute that command.

在package.json的开发依赖项中,我必须使用

"bower": "1.4.1"
下面的消息解释了heroku团队的注意事项

    This error happens when you try running bower install after installing all you dependencies. However, bower isn't there.
You need to add it to your package.json so the executable is available to your app and you can execute that command.

在package.json文件中添加此代码

 "start": "node ./bin/www",
    "client": "npm start -prefix client",
    "heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"

在package.json文件中添加此代码

 "start": "node ./bin/www",
    "client": "npm start -prefix client",
    "heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"