Deploy an application created using rails on heroku
Please write your question in detail here.
When I made a web application with rails and deployed it with heroku, the following error occurred, so I want to solve it.

When I made a web application with rails and deployed it with heroku, the following error occurred.

Error message
remote: Bundle complete! 22 Gemfile dependencies, 81 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:
remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
remote: But that may break your application.
remote: remote:
remote: If i am upgrading your Rails application from an older version of Rails:
remote: 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:
remote: If i am starting a NEW Rails application, you can ignore this notice.
remote: remote:
remote: For more info see:
remote: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
remote: remote:
remote: Bundle completed (181.42s)
remote: Cleaning up the bundler cache.
remote: ----->Installing node-v12.16.2-linux-x64
remote: ----->Installing yarn-v1.22.4
remote: ----->Detecting rake tasks
remote: ----->Preparing app for Rails asset pipeline
remote: Running: rake assets: precompile
remote: yarn install v1.22.4
remote: [1/4] Resolving packages ...
remote: [2/4] Fetching packages ...
remote: error An unexpected error occurred: "https://registry.yarnpkg.com/cosmiconfig/-/cosmi-5.2.1.tgz: Request failed \" 404 Not Found \ "".
remote: info If i think this is a bug, please open a bug report with the information provided in "/tmp/build_b27cb7de/yarn-error.log".
remote: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
remote: remote:
remote:! Precompiling assets failed.
remote:! Push rejected, failed to compile Ruby app.
remote: remote:
remote:! Push failed
remote: Verifying deploy ...
remote: remote:
remote:! Push rejected to guchikomi 1.
remote: remote:
To https://git.heroku.com/guchikomi1.git
! [remote rejected] master->master (pre-receive hook declined)
error: failed to push some refs to'https://git.heroku.com/guchikomi1.git'

Corresponding source code

``` Enter the language name here

What I tried

config.i18n.fallbacks = true
config.i18n.fallbacks = [I18n.default_locale]
Even if I change it like this and deploy it again, I cannot push with the same error.

Supplementary information (FW/tool version, etc.)

Please provide more detailed information here.

  • Answer # 1

    Looking at the log, yarn install is failing. Therefore, I thought that something was wrong with yarn. So I think you need to either remove node_module and do a yarn install again or do a yarn upgrade to update the package.