11976


以下の通りにpackage.jsonとweb.jsを記述しherokuにデプロイしましたが、以下のエラーでデプロイできません。

エラー内容

[code]

    remote: -----> Building dependencies
    remote:        Pruning any extraneous modules
    remote:        Installing node modules (package.json)
    remote:
    remote:        > app_name@0.0.1 postinstall /tmp/build_11023d05cefa4e84389aa595131ba028
    remote:        > bower install
    remote:
    remote:        sh: 1: bower: not found
    remote:
    remote:        npm ERR! Linux 3.13.0-49-generic
    remote:        npm ERR! argv "/tmp/build_11023d05cefa4e84389aa595131ba028/.heroku/node/bin/node" "/tmp/build_11023d05cefa4e84389aa595131ba028/.heroku/node/bin/npm" "install" "--unsafe-perm" "--userconfig" "/tmp/build_11023d05cefa4e84389aa595131ba028/.npmrc"
    remote:        npm ERR! node v0.12.5
      1 {
    remote:        npm ERR! npm  v2.11.2
    remote:        npm ERR! file sh
    remote:        npm ERR! code ELIFECYCLE
    remote:        npm ERR! errno ENOENT
    remote:        npm ERR! syscall spawn
    remote:        npm ERR! app_name@0.0.1 postinstall: `bower install`
    remote:        npm ERR! spawn ENOENT
    remote:        npm ERR!
    remote:        npm ERR! Failed at the app_name@0.0.1 postinstall script 'bower install'.
    remote:        npm ERR! This is most likely a problem with the package,
    remote:        npm ERR! not with npm itself.
    remote:        npm ERR! Tell the author that this fails on your system:
    remote:        npm ERR!     bower install
    remote:        npm ERR! You can get their info via:
    remote:        npm ERR!     npm owner ls app_name
    remote:        npm ERR! There is likely additional logging output above.
    remote:
    remote:        npm ERR! Please include the following file with any support request:
    remote:        npm ERR!     /tmp/build_11023d05cefa4e84389aa595131ba028/npm-debug.log
    remote:
    remote: -----> Build failed
    
[/code]

package.json

[code]

      1 {
      2   "name": "app_name",
      3   "version": "0.0.1",
      4   "private": true,
      5   "devDependencies": {
      6     "http-server": "^0.8.0",
      7     "bower": "1.4.1",
      8     "express": "4.13.0"
      9   },
     10   "engine": {
     11     "node": "0.12.4",
     12     "npm": "2.10.1"
     13   },
     14   "scripts": {
     15     "postinstall": "bower install",
     16     "prestart": "npm install",
     17     "start": "http-server -a localhost -p 8000 -c-1"
     18   }
     19 }
    
[/code]

web.js

[code]

      1 var express = require('express');
      2 var app = express();
      3 var port = Number(process.env.PORT || 8000);
      4
      5 app.use(express.static(__dirname + '/'));
      6 var server = app.listen(port, function(){console.log('Listening on port %d', server.address().port);});
    
[/code]

エラーを見る限りbower install
ができていないみたいですが、どこが間違っているのかわからない状況です。どなたかおわかりになるかたぎ教授ください。よろしくおねがいします。

補足:  
ちなみにこのpackage.jsonはhttps://github.com/angular/angular-seedを参考にしました。


CC BY-SA 3.0
2015-07-02T17:22:57.753
11974
2015-07-13T08:16:34.343
2015-07-13T08:16:34.343
7232
7232
question
angularjs node.js heroku デプロイ
herokuにAngularJSのアプリをNodeを使ってデプロイしたい。


自己解決しました。  
devDependenciesは開発用の記述で本番庸ではdependenciesを書かなければなりませんでした。


CC BY-SA 3.0
2015-07-02T22:32:01.843
11976
2015-07-02T22:32:01.843
7232
11974
answer