I am migrating a rails app to react. I followed webpacker instructions, but webpacker is not creating /public/packs/manifest.json file. If I create a new app, I works correctly. I have tried everything. Nothing is working. I am new to rails, so I don't know what I'm doing wrong. Here are the step that I perfromed:
Place in Gemfile a. gem 'webpacker', '~> 3.5'; tried it without the second string and other version b. gem 'react-rails'
bundle install
bundle exec rails webpacker:install
bundle exec rails webpacker:install:react
yarn add react-dom react-on-rails
rails generate react:install
Sys config yarn - 1.22.10 webpack - 5.38.1 webpacker - 4.3.0 react-rails - 2.6.1 rails - 5.2.6 ruby - 2.6.6
THIS IS THE ERROR MESSAGE:
Webpacker can't find hello_react in /Users/lyte/Taichi_Project/taichi_school_v1/public/packs/manifest.json. Possible causes:
- You want to set webpacker.yml value of compile to true for your environment
unless you are using the
webpack -w
or the webpack-dev-server. - webpack has not yet re-run to reflect updates.
- You have misconfigured Webpacker's config/webpacker.yml file.
- Your webpack configuration is not creating a manifest. Your manifest contains: { }
Any suggestions would be appreciated.