現在、Ruby on Rails にてポートフォリオを作成中です。
https://qiita.com/kazukimatsumoto/items/a0daa7281a3948701c39
現在、この記事を参考にしながらherokuへのデプロイを試みています。
git push heroku masterをmacターミナル上で入力したところ、
remote: Compiling... remote: Compilation failed: remote: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. remote: - configuration.entry should be an non-empty object. remote: -> Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array. remote: remote: remote: ! remote: ! Precompiling assets failed. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to damp-mountain-33769. remote: To https://git.heroku.com/damp-mountain-33769.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/damp-mountain-33769.git'
このようなエラー文が出ます。
下記の画像がログの全容です(所々省略しています)
% git push heroku master Enumerating objects: 462, done. Counting objects: 100% (462/462), done. Delta compression using up to 4 threads Compressing objects: 100% (425/425), done. Writing objects: 100% (462/462), 2.97 MiB | 462.00 KiB/s, done. Total 462 (delta 145), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. remote: Detected buildpacks: Ruby,Node.js remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order remote: -----> Ruby app detected remote: -----> Installing bundler 2.0.2 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.6.3 remote: remote: ###### WARNING: remote: remote: Removing `Gemfile.lock` because it was generated on Windows. remote: Bundler will do a full resolve so native gems are handled properly. remote: This may result in unexpected gem versions being used in your app. remote: In rare occasions Bundler may not be able to resolve your dependencies at all. remote: https://devcenter.heroku.com/articles/bundler-windows-gemfile remote: remote: -----> Installing dependencies using bundler 2.0.2 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 remote: Fetching https://github.com/refile/refile.git remote: Fetching https://github.com/refile/refile-mini_magick.git remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. remote: Fetching gem metadata from https://rubygems.org/........ remote: Fetching gem metadata from https://rubygems.org/. remote: Resolving dependencies....... remote: Fetching rake 13.0.1 remote: Bundle complete! 30 Gemfile dependencies, 133 gems now installed. remote: Gems in the groups development and test were not installed. remote: Bundled gems are installed into `./vendor/bundle` remote: Post-install message from i18n: remote: remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. remote: But that may break your application. remote: remote: If you are upgrading your Rails application from an older version of Rails: remote: remote: Please check your Rails app for 'config.i18n.fallbacks = true'. remote: If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be remote: 'config.i18n.fallbacks = [I18n.default_locale]'. remote: If not, fallbacks will be broken in your app by I18n 1.1.x. remote: remote: If you are starting a NEW Rails application, you can ignore this notice. remote: remote: For more info see: remote: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 remote: remote: Post-install message from fog: remote: ------------------------------ remote: Thank you for installing fog! remote: remote: IMPORTANT NOTICE: remote: If there's a metagem available for your cloud provider, e.g. `fog-aws`, remote: you should be using it instead of requiring the full fog collection to avoid remote: unnecessary dependencies. remote: remote: 'fog' should be required explicitly only if: remote: - The provider you use doesn't yet have a metagem available. remote: - You require Ruby 1.9.3 support. remote: ------------------------------ remote: Bundle completed (218.72s) remote: Cleaning up the bundler cache. remote: -----> Installing node-v10.15.3-linux-x64 remote: -----> Installing yarn-v1.16.0 remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: yarn install v1.16.0 remote: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: info fsevents@1.2.9: The platform "linux" is incompatible with this module. remote: info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation. remote: [3/4] Linking dependencies... remote: warning " > webpack-dev-server@3.10.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". remote: warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0". remote: [4/4] Building fresh packages... remote: Done in 22.59s. remote: yarn install v1.16.0 remote: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: info fsevents@1.2.9: The platform "linux" is incompatible with this module. remote: info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation. remote: [3/4] Linking dependencies... remote: warning " > webpack-dev-server@3.10.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". remote: warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0". remote: [4/4] Building fresh packages... remote: Done in 4.74s. remote: I, [2020-03-13T02:32:32.943423 #2012] INFO -- : Writing /tmp/build_732b88bd81a0922ddd0f2a3794bbbe05/public/assets/manifest-cadda289ef9c70eaa0879a36e6263cb33f7523a16b3ef862e0b8609cdc2bdab1.js ※ここから前途したエラー文が出る
-以下、自分で試したこと-
・cssをsccsに変えてみた
・config/application.rbに「config.assets.initialize_on_precompile = false」を追加し、再度git push heroku master
・RAILS_ENV=development bin/rails assets:precompileを入力して開発環境内のエラーを確認(該当なし)
・RAILS_ENV=production bin/rails assets:precompileを入力し、本番環境内の異常を確認(該当なし)
というような感じです。アドバイスいただけると幸いです。また、herokuに触れて間もないので、補足が必要でしたらご指摘いただきたいです。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。