rails generate controller home top
When opening a page created appropriately with a command such as, the following error occurs.
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.
brew install yarn --ignore-dependencies
icu4c does not require --ignore-dependencies.
brew install icu4c
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