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

Bal*_*nce 5 ruby ruby-on-rails webpack

我已经下载了Honeybadger Webpack示例并运行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:
{
}
Run Code Online (Sandbox Code Playgroud)

适用于线 <%= javascript_pack_tag 'application' %>

我的问题在哪里?

小智 4

有同样的问题。修复是:

  1. 在控制台运行“bundle execrails webpacker:install”升级到最新版本的webpacker
  2. 发现我的node版本(8.6.0)与当前版本的webpack不兼容
  3. 使用NVM升级到Node 10.16.0
  4. 在控制台中重新运行“bundle execrails webpacker:install”(不确定这是否有必要)

最后它开始工作了!