[RAILS] Webpacker :: Manifest :: MissingEntryError

rails generate controller home top

When opening a page created appropriately with a command such as, the following error occurs. スクリーンショット 2021-01-04 21.58.22.png

The following display is displayed on the terminal.


Webpacker can't find application in app name/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.

・ manifest.json cannot be found. ・ The 9th line of application.html.erb in views/layouts is strange.

I researched and tried various things to solve these two points, but there was no improvement. In the article I checked, I think that the ver of node is related ~, so while changing the ver of node, reinstall node, yarn etc. introduced for webpacker install I tried it. node ver changed from the latest version to v14.15.4 installed by stable. I solved it by following the steps below.

    1. To change the ver of node, uninstall the node managed by homebrew. (Because I didn't know how to change the node ver with homebrew.) Reinstall the stable version with nodebrew.
    1. Yarn/icu4c is also uninstalled once. Install again with homebrew
brew install yarn --ignore-dependencies

icu4c does not require --ignore-dependencies.

brew install icu4c
    1. Create a new project with rails new. If node, yarn, icu4c are already installed at this time, webpacker will be installed without permission.
  1. When I rails s and check the page created properly, no error occurs.

Because of this, the work did not proceed at all, so it was really good to improve.

It seems that webpacker is introduced as standard after rails6, and my rails is also v6.0.3.4. I think that the cause of this time was that the compatibility of node ver was bad, but I will do that.

Recommended Posts

Webpacker :: Manifest :: MissingEntryError
Countermeasures against "Webpacker :: Manifest :: MissingEntryError"
[Solution] Rails6 Webpacker :: Manifest :: MissingEntryError
[Solution] Webpacker :: Manifest :: MissingEntryError in Rails
WebPacker 3.x-> 5.x
Solution when you get the error Webpacker :: Manifest :: MissingEntryError in Devise :: Sessions # new