前提・実現したいこと
アプリ作成中で、Herokuにデプロイしようとして、
git push heroku master をした際のエラーになります。
Herokuにプッシュしてデプロイできることを目指したいと思っています。
ローカル環境では問題なく表示されます。
発生している問題・エラーメッセージ
Heroku
1-----> Building on the Heroku-18 stack 2-----> Using buildpacks: 3 1. heroku/nodejs 4 2. heroku/ruby 5-----> Node.js app detected 6 7-----> Creating runtime environment 8 9 NPM_CONFIG_LOGLEVEL=error 10 USE_YARN_CACHE=true 11 NODE_ENV=production 12 NODE_MODULES_CACHE=true 13 NODE_VERBOSE=false 14 15-----> Installing binaries 16 engines.node (package.json): 14.x.x 17 engines.npm (package.json): unspecified (use default) 18 engines.yarn (package.json): unspecified (use default) 19 20 Resolving node version 14.x.x... 21 Downloading and installing node 14.19.1... 22 Using default npm version: 6.14.16 23 Resolving yarn version 1.22.x... 24 Downloading and installing yarn (1.22.18) 25 Installed yarn 1.22.18 26 27-----> Installing dependencies 28 Installing node modules (yarn.lock) 29 yarn install v1.22.18 30 [1/4] Resolving packages... 31 [2/4] Fetching packages... 32 [3/4] Linking dependencies... 33 warning " > webpack-dev-server@4.8.1" has unmet peer dependency "webpack@^4.37.0 || ^5.0.0". 34 warning "webpack-dev-server > webpack-dev-middleware@5.3.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". 35 [4/4] Building fresh packages... 36 Done in 20.11s. 37 38-----> Build 39 40-----> Pruning devDependencies 41 yarn install v1.22.18 42 [1/4] Resolving packages... 43 [2/4] Fetching packages... 44 [3/4] Linking dependencies... 45 warning " > webpack-dev-server@4.8.1" has unmet peer dependency "webpack@^4.37.0 || ^5.0.0". 46 warning "webpack-dev-server > webpack-dev-middleware@5.3.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". 47 [4/4] Building fresh packages... 48 warning Ignored scripts due to flag. 49 Done in 2.80s. 50 51-----> Caching build 52 - yarn cache 53 54-----> Build succeeded! 55 ! This app may not specify any way to start a node process 56 https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type 57 ! Unmet dependencies don't fail yarn install but may cause runtime issues 58 https://github.com/npm/npm/issues/7494 59-----> Ruby app detected 60-----> Installing bundler 2.3.10 61-----> Removing BUNDLED WITH version in the Gemfile.lock 62-----> Compiling Ruby/Rails 63-----> Using Ruby version: ruby-2.6.5 64-----> Installing dependencies using bundler 2.3.10 65 Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4 66 67(中略) 68 Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-class-properties. 69 The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding 70 ["@babel/plugin-proposal-private-property-in-object", { "loose": true }] 71 to the "plugins" section of your Babel config. 72 Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-property-in-object. 73 The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding 74 ["@babel/plugin-proposal-private-methods", { "loose": true }] 75 to the "plugins" section of your Babel config. 76 Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-class-properties. 77 The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding 78 ["@babel/plugin-proposal-private-property-in-object", { "loose": true }] 79 to the "plugins" section of your Babel config. 80 Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-property-in-object. 81 The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding 82 ["@babel/plugin-proposal-private-methods", { "loose": true }] 83 to the "plugins" section of your Babel config. 84 Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-class-properties. 85 The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding 86 ["@babel/plugin-proposal-private-property-in-object", { "loose": true }] 87 to the "plugins" section of your Babel config. 88 Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-property-in-object. 89 The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding 90 ["@babel/plugin-proposal-private-methods", { "loose": true }] 91 to the "plugins" section of your Babel config. 92 Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-class-properties. 93 The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding 94 ["@babel/plugin-proposal-private-property-in-object", { "loose": true }] 95 to the "plugins" section of your Babel config. 96 Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-property-in-object. 97 The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding 98 ["@babel/plugin-proposal-private-methods", { "loose": true }] 99 to the "plugins" section of your Babel config. 100 101 ! 102 ! Precompiling assets failed. 103 ! 104 ! Push rejected, failed to compile Ruby app. 105 ! Push failed 106
おそらくここが問題だとは思いいろいろ調べてみましたが、どのような意味になるのか分かりませんでした。
試したこと
このへんのコマンドは試してみましたが特に変わりませんでした。
参考資料:https://qiita.com/nto300002/items/54a3c8d96956cbdd7cf1#%E7%B5%90%E8%AB%96
$ heroku buildpacks:set https://github.com/bundler/heroku-buildpack-bundler2
をした後に、git push heroku master をしたが特に変わらず。
参考資料:https://qiita.com/ho_soft/items/90733a77c04539504206
おそらくバージョンの問題なのではないかと思いますが、どのように変えればいいのかがわかりませんでした。
``Heroku
Building on the Heroku-18 stack
-----> Using buildpacks:
1. heroku/nodejs
2. heroku/ruby
-----> Node.js app detected
buildpacks:のところが怪しそうですがどのようにすればいいのか分かりませんでした。 ```Heroku Build succeeded! ! This app may not specify any way to start a node process https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type ! Unmet dependencies don't fail yarn install but may cause runtime issues
このへんも調べてみましたがよく分かりませんでした。
補足情報(FW/ツールのバージョンなど)
同じようなHerokuでのエラーが見られるので、どこかに解決法がのっているかもしれませんが理解することができませんでした。
長文になり分かりにくいかと思いますがご教授いただけると幸いです。よろしくお願いします。
ここにより詳細な情報を記載してください。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2022/04/28 01:37
2022/04/28 04:08
2022/04/30 00:22
2022/04/30 04:35