Webpacker can't find application in ... manifest.json (at runtime)
See original GitHub issueSteps to reproduce
Follow the Get started with Webpacker
instruction exactly, except with an existing app.
Expected behavior
Render my component.
Actual behavior
Upon hitting the route that serves the view with the react component, get this:
Webpacker can't find application in <my app path>/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:
{
}
The message is correct, there is no public/packs/manifest.json
file. That was not in the instructions, so I assume it is supposed to be created, I guess by the webpack dev server.
I updated yarn
to the latest version: 1.16.0
.
System configuration
Webpacker version: 4.0.7 React-Rails version: 2.5.0 Rails version: 5.2.3 Ruby version: 2.6.3
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Webpacker can't find application - ruby on rails - Stack Overflow
Try simply running the yarn command in your project directory. That should result in a manifest.json file being created - among other things....
Read more >Webpacker can't find application.js in manifest.json
Webpacker can't find application.js in /Users/can/RubymineProjects/cancoel/public/packs/manifest.json. Possible causes: 1.
Read more >Webpacker can't find application.js in /app/public/packs ...
I had this error yesterday and solved it by editing the webpacker.yml file to point to the packs/application.js file. I edited the source_path...
Read more >Webpacker Can't Find Application.Js In Manifest.Json - ADocLib
Webpacker can pretend everything went smooth with the Debugging silently failing compilation aka Webpacker can't find application.js in public/packs/manifest.
Read more >application does not start after run bin/setup (page xviii)
... (Webpacker can't find application.css in /Users/thomas/Documents/Websites/rails-frontend/public/packs/manifest.json. Possible causes:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Node modules get corrupt all the time. Javascript does this often, I tend to see this myself randomly once a month. Especially prevalent on Windows, still happens but less often on Ubuntu. I tend to trash all current assets and modules and do a clean rebuild.
If that doesn’t so it, check you can install them gem onto a
rails new foo --webpack
application to confirm it’s not something with your machine. If that works and it’s still not working then it’s some config in your existing app.Ran into this issue today while setting up a new Rails app.
while running
$ bundle exec rails webpacker:install
I spotted following error in the console
After a lot of trial and error I learnt that you can just resolve this issue in 3 steps: