我已经下载了 Honeybadger webpack example然后运行 bundle install
.
我在终端中没有任何错误,但是当我启动我的服务器时得到以下信息:
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:
{
}
它适用于 <%= javascript_pack_tag 'application' %>
行
我的问题在哪里?
最佳答案
遇到了同样的问题。修复是:
- 在控制台运行“bundle exec rails webpacker:install”升级到最新版本的webpacker
- 发现我的节点版本(8.6.0)与当前版本的 webpack 不兼容
- 使用 NVM 升级到 Node 10.16.0
- 在控制台中重新运行“bundle exec rails webpacker:install”(不确定是否有必要)
最后它开始工作了!
关于ruby-on-rails - Hello#index 中的 Webpacker::Manifest::MissingEntryError(ruby on rails),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49069687/