閲覧ありがとうございます????
どうしても自己解決できず、サイトがデプロイできなくて困っているのでご助言お願い致します…
環境
- Vue.js@3.11.0
- Vue CLI
- Vue Router
- Vuetify
- Pug
具体的なエラー内容
- 初回デプロイ時、
npm ERR! missing script: start
とエラーが出た - ググった結果
package.json
にscripts/start
が記載されていない為と判明した - そこで再度ググり、
scripts
内に"start": "node app.js"
と追記した - しかし今度は下記エラーが出た
2019-09-10T16:09:05.657012+00:00 heroku[web.1]: State changed from crashed to starting 2019-09-10T16:09:11.855249+00:00 heroku[web.1]: State changed from crashed to starting 2019-09-10T16:09:14.413610+00:00 heroku[web.1]: Starting process with command `npm start` 2019-09-10T16:09:16.935958+00:00 heroku[web.1]: State changed from starting to crashed 2019-09-10T16:09:16.944014+00:00 heroku[web.1]: State changed from crashed to starting 2019-09-10T16:09:17.403296+00:00 heroku[web.1]: Process exited with status 1 2019-09-10T16:09:17.130102+00:00 app[web.1]: 2019-09-10T16:09:17.130143+00:00 app[web.1]: > joe_portfolio@0.1.0 start /app 2019-09-10T16:09:17.130146+00:00 app[web.1]: > node app.js 2019-09-10T16:09:17.130148+00:00 app[web.1]: 2019-09-10T16:09:17.297518+00:00 app[web.1]: internal/modules/cjs/loader.js:638 2019-09-10T16:09:17.297522+00:00 app[web.1]: throw err; 2019-09-10T16:09:17.297524+00:00 app[web.1]: ^ 2019-09-10T16:09:17.297526+00:00 app[web.1]: 2019-09-10T16:09:17.297528+00:00 app[web.1]: Error: Cannot find module '/app/app.js' 2019-09-10T16:09:17.297531+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) 2019-09-10T16:09:17.297533+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:562:25) 2019-09-10T16:09:17.297535+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) 2019-09-10T16:09:17.297537+00:00 app[web.1]: at startup (internal/bootstrap/node.js:283:19) 2019-09-10T16:09:17.297539+00:00 app[web.1]: at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) 2019-09-10T16:09:17.310468+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2019-09-10T16:09:17.311114+00:00 app[web.1]: npm ERR! errno 1 2019-09-10T16:09:17.313825+00:00 app[web.1]: npm ERR! joe_portfolio@0.1.0 start: `node app.js` 2019-09-10T16:09:17.314158+00:00 app[web.1]: npm ERR! Exit status 1 2019-09-10T16:09:17.314670+00:00 app[web.1]: npm ERR! 2019-09-10T16:09:17.315211+00:00 app[web.1]: npm ERR! Failed at the joe_portfolio@0.1.0 start script. 2019-09-10T16:09:17.315543+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2019-09-10T16:09:17.327378+00:00 app[web.1]: 2019-09-10T16:09:17.327661+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2019-09-10T16:09:17.327821+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-09-10T16_09_17_318Z-debug.log 2019-09-10T16:09:25.990815+00:00 heroku[web.1]: Starting process with command `npm start` 2019-09-10T16:09:28.513314+00:00 heroku[web.1]: State changed from starting to crashed 2019-09-10T16:09:28.413181+00:00 app[web.1]: 2019-09-10T16:09:28.417128+00:00 app[web.1]: > joe_portfolio@0.1.0 start /app 2019-09-10T16:09:28.417131+00:00 app[web.1]: > node app.js 2019-09-10T16:09:28.417133+00:00 app[web.1]: 2019-09-10T16:09:28.551214+00:00 app[web.1]: internal/modules/cjs/loader.js:638 2019-09-10T16:09:28.551219+00:00 app[web.1]: throw err; 2019-09-10T16:09:28.551221+00:00 app[web.1]: ^ 2019-09-10T16:09:28.551223+00:00 app[web.1]: 2019-09-10T16:09:28.551225+00:00 app[web.1]: Error: Cannot find module '/app/app.js' 2019-09-10T16:09:28.551228+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) 2019-09-10T16:09:28.551230+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:562:25) 2019-09-10T16:09:28.551232+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) 2019-09-10T16:09:28.551237+00:00 app[web.1]: at startup (internal/bootstrap/node.js:283:19) 2019-09-10T16:09:28.551239+00:00 app[web.1]: at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) 2019-09-10T16:09:28.561407+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2019-09-10T16:09:28.562235+00:00 app[web.1]: npm ERR! errno 1 2019-09-10T16:09:28.564822+00:00 app[web.1]: npm ERR! joe_portfolio@0.1.0 start: `node app.js` 2019-09-10T16:09:28.565072+00:00 app[web.1]: npm ERR! Exit status 1 2019-09-10T16:09:28.565563+00:00 app[web.1]: npm ERR! 2019-09-10T16:09:28.565763+00:00 app[web.1]: npm ERR! Failed at the joe_portfolio@0.1.0 start script. 2019-09-10T16:09:28.565946+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2019-09-10T16:09:28.573700+00:00 app[web.1]: 2019-09-10T16:09:28.574231+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2019-09-10T16:09:28.574534+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-09-10T16_09_28_568Z-debug.log 2019-09-10T16:09:28.630295+00:00 heroku[web.1]: Process exited with status 1 2019-09-10T16:09:29.141200+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=portfolio-joe.herokuapp.com request_id=a01d5cb4-9326-4918-98e6-299482f8bbca fwd="175.132.210.196" dyno= connect= service= status=503 bytes= protocol=https 2019-09-10T16:09:31.497326+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=portfolio-joe.herokuapp.com request_id=f9280532-1eb0-4096-acd8-c5188c54d2d8 fwd="175.132.210.196" dyno= connect= service= status=503 bytes= protocol=https
考えられるエラー原因
- 全て
yarn
でインストールしたつもりだが、どこかでnpm
が混ざっておかしくなった - スタート時、自分用の上記環境を揃えたリポジトリをcloneしてから開発したせいでおかしくなった(そのリポジトリを用いた他のアプリは正常にデプロイできました)
コード
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/09/13 12:00