【问题标题】:Webpacker::Manifest::MissingEntryError in Hello#index ( ruby on rails)Webpacker::Manifest::MissingEntryError in Hello#index ( ruby​​ on rails)
【发布时间】:2018-08-10 16:50:12
【问题描述】:

我已经下载了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' %>这一行

我的问题可能出在哪里?

【问题讨论】:

    标签: ruby-on-rails ruby webpack


    【解决方案1】:

    遇到了同样的问题。修复是:

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

    最后它开始工作了!

    【讨论】:

      【解决方案2】:

      在我的情况下,这是因为我设置了 extract_css: true 但我没有导入任何 css

      【讨论】:

        猜你喜欢
        • 2019-06-04
        • 2021-07-13
        • 2020-03-11
        • 2019-03-09
        • 1970-01-01
        • 2018-04-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多