Rails: Webpacker::Manifest::MissingEntryError in Home#index Rails: Webpacker::Manifest::MissingEntryError in Home#index reactjs reactjs

Rails: Webpacker::Manifest::MissingEntryError in Home#index


Though I am not using react, but was getting the same error on a newly created Rails 6 app. Reinstalling webpacker fixed it for me:

bundle exec rake webpacker:install

I guess it probably was some missing dependency, or a bug in an older version (I noticed webpack-dev-server version was upgraded to 3.8.1).


I had to same challenge when trying to set up a new Rails 6 application in Ubuntu 20.04.

When I start the rails server, and go to my browser I get the error:

Webpacker::Manifest::MissingEntryError in Books#indexShowing /home/promisepreston/dynamic_authorization/app/views/layouts/application.html.erb where line #9 raised:Webpacker can't find application in /home/promisepreston/dynamic_authorization/public/packs/manifest.json. Possible causes:1. 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.2. webpack has not yet re-run to reflect updates.3. You have misconfigured Webpacker's config/webpacker.yml file.4. Your webpack configuration is not creating a manifest.Your manifest contains:{

Here's how I fixed it:

The issue was that I had not setup webpacker in the Rails 6 application. Starting with Rails 6, webpacker is the default JavaScript compiler. It means that all the JavaScript code will be handled by webpacker instead of the old assets pipeline aka sprockets.

To install webpacker in your Rails 6 application simply run the command:

bundle exec rails webpacker:install

OR

rails webpacker:install

This should successfully install webpacker and all of its dependencies.

That's all.

I hope this helps


may be you missed to install npm install. I faced exactly same issue which you have mention. Just type npm install in your terminal or Dockerfile. I hope this issue will be solved.

$ npm install