rails apiモードとnuxt.jsでポートフォリオを作っています
nuxt.jsアプリケーションをherokuにデプロイしてページにアクセスしようとしたところアプリケーションエラーとなってしまいます。
herokuのログを確認すると以下の出力がありました。
2021-09-17T15:53:20.755580+00:00 heroku[web.1]: Process exited with status 1 2021-09-17T15:53:20.983471+00:00 heroku[web.1]: State changed from starting to crashed 2021-09-17T16:49:24.101937+00:00 heroku[web.1]: State changed from crashed to starting 2021-09-17T16:49:37.657963+00:00 heroku[web.1]: Starting process with command `/bin/sh -c npm\ run\ start` 2021-09-17T16:49:38.685264+00:00 app[web.1]: TypeError: Class extends value undefined is not a constructor or null 2021-09-17T16:49:38.685279+00:00 app[web.1]: at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/socks-proxy-agent/dist/agent.js:114:44) 2021-09-17T16:49:38.685279+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1137:30) 2021-09-17T16:49:38.685279+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) 2021-09-17T16:49:38.685280+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:985:32) 2021-09-17T16:49:38.685280+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:878:14) 2021-09-17T16:49:38.685280+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:1025:19) 2021-09-17T16:49:38.685280+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:72:18) 2021-09-17T16:49:38.685280+00:00 app[web.1]: at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/socks-proxy-agent/dist/index.js:5:33) 2021-09-17T16:49:38.685281+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1137:30) 2021-09-17T16:49:38.685281+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) 2021-09-17T16:49:38.685281+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:985:32) 2021-09-17T16:49:38.685281+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:878:14) 2021-09-17T16:49:38.685281+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:1025:19) 2021-09-17T16:49:38.685282+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:72:18) 2021-09-17T16:49:38.685282+00:00 app[web.1]: at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/make-fetch-happen/lib/agent.js:161:25) 2021-09-17T16:49:38.685282+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1137:30) 2021-09-18T03:13:24.984129+00:00 heroku[web.1]: Process exited with status 1 2021-09-18T03:13:25.049341+00:00 heroku[web.1]: State changed from starting to crashed 2021-09-18T06:17:07.517754+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=todonuxt-front.herokuapp.com request_id=5f548142-afcb-40d3-9e1e-d625783628d4 fwd="103.5.140.166" dyno= connect= service= status=503 bytes= protocol=https 2021-09-18T06:17:08.371354+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=todonuxt-front.herokuapp.com request_id=8e558782-bfb0-4666-9ab0-14469c04e2df fwd="103.5.140.166" dyno= connect= service= status=503 bytes= protocol=https 2021-09-18T06:18:29.201553+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=todonuxt-front.herokuapp.com request_id=d63c807c-9c84-4fdc-9173-daf6cfc483a8 fwd="103.5.140.166" dyno= connect= service= status=503 bytes= protocol=https 2021-09-18T06:18:29.527148+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=todonuxt-front.herokuapp.com request_id=2fa06fea-0e8f-4145-b49c-a0819a3daf44 fwd="103.5.140.166" dyno= connect= service= status=503 bytes= protocol=https
package.jsonの中身はこんな感じです
{ "name": "front", "version": "1.0.0", "private": true, "scripts": { "dev": "nuxt", "build": "nuxt build", "start": "nuxt build && nuxt start", "generate": "nuxt generate", "test": "jest", "lint": "vue-cli-service lint", "lint:fix": "eslint --fix --ext .ts,.js,.vue --ignore-path .gitignore .", "heroku-postbuild": "npm run build" }, "dependencies": { "@nuxtjs/auth": "^4.9.1", "@nuxtjs/proxy": "^2.1.0", "axios": "^0.21.4", "core-js": "^3.9.1", "nuxt": "^2.13.3", "vee-validate": "^3.4.11", "vue-ctk-date-time-picker": "^2.5.0", "vue-infinite-loading": "^2.4.5" }, "devDependencies": { "@nuxtjs/eslint-module": "^3.0.2", "@nuxtjs/moment": "^1.6.1", "@nuxtjs/vuetify": "^1.11.3", "@vue/test-utils": "^1.1.3", "babel-core": "7.0.0-bridge.0", "babel-eslint": "^10.1.0", "babel-jest": "^26.6.3", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^3.4.1", "eslint-plugin-vue": "^7.17.0", "jest": "^26.6.3", "madge": "^5.0.1", "vue-jest": "^3.0.4" } }
heroku画面でビルドできたかは確認できていますが、解決できません。
heroku に知見ある方手伝ってもらえませんか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。