问题
I have downloaded the Honeybadger webpack example and run bundle install
.
I don't have any errors in terminal, yet get the following when I start my server:
Webpacker can't find application.js in /Users/admin/Documents/sourcemap/honeybadger-rails-webpacker-example/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:
{
}
It applies to the line <%= javascript_pack_tag 'application' %>
Where can be my problem?
回答1:
Had the same problem. Fix was:
- Run "bundle exec rails webpacker:install" in the console to upgrade to the latest version of webpacker
- Find out that my node version (8.6.0) was incompatible with the current version of webpack
- Use NVM to upgrade to Node 10.16.0
- Rerun "bundle exec rails webpacker:install" in the console (not sure if this was necessary)
At the end of this it started working!
回答2:
in my case it was because i was setting extract_css: true
but i didn't import any css
来源:https://stackoverflow.com/questions/49069687/webpackermanifestmissingentryerror-in-helloindex-ruby-on-rails