Webpacker::Manifest::MissingEntryError in Hello#index ( ruby on rails)

随声附和 提交于 2021-02-07 06:22:21

问题


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:

  1. Run "bundle exec rails webpacker:install" in the console to upgrade to the latest version of webpacker
  2. Find out that my node version (8.6.0) was incompatible with the current version of webpack
  3. Use NVM to upgrade to Node 10.16.0
  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!