私はHerokuにgulp
を使用するNodeJSアプリケーションをデプロイしましたが、Herokuでは動作しません。ここでHerokuでgulpを実行するにはどうすればよいですか?
はpackage.json
です:
{
"name": "app-name",
"version": "1.0.0",
"previewUrl": "http://blahblah.com",
"publishUrl": "gs://blahblah.com",
"description": "",
"repository": {
"type": "git",
"url": "git://github.com/github_username/git_repo.git"
},
"devDependencies": {
"browser-sync": "*",
"browserify": "*",
"gulp": "*",
"gulp-autoprefixer": "*",
"gulp-changed": "*",
"gulp-filesize": "*",
"gulp-imagemin": "*",
"gulp-minify-css": "*",
"gulp-notify": "*",
"gulp-rev-all": "*",
"gulp-sass": "*",
"gulp-sourcemaps": "*",
"gulp-uglify": "*",
"gulp-util": "*",
"lodash": "*",
"pretty-hrtime": "*",
"require-dir": "*",
"velocity-animate": "^1.2.2",
"vinyl-source-stream": "*",
"watchify": "*"
},
"dependencies": {
"underscore": "~1.7.0",
"jquery": "~2.1.0",
"keen-js": "~3.2.4",
"superagent": "~1.2.0"
}
}
ここgulpfile.js
です:
var requireDir = require('require-dir');
// Require all tasks in gulp/tasks, including subfolders
requireDir('./gulp/tasks', { recurse: true });
はここProcfile
です:
`web: gulp`
私はHerokuのにデプロイすると、アプリがホストされているサイトに行くとき「アプリケーションに失敗しました」というエラーが表示されます。 Herokuのログを確認すると、次のように表示されます。
2016-10-27T22:20:10.439111+00:00 heroku[web.1]: Starting process with command `gulp`
2016-10-27T22:20:12.282952+00:00 app[web.1]: bash: gulp: command not found
2016-10-27T22:20:12.376610+00:00 heroku[web.1]: Process exited with status 127
2016-10-27T22:20:12.371981+00:00 heroku[web.1]: State changed from starting to crashed
2016-10-27T22:20:12.373134+00:00 heroku[web.1]: State changed from crashed to starting
2016-10-27T22:20:14.527034+00:00 heroku[web.1]: Starting process with command `gulp`
なぜこのアプリはこれを行いますか?