我正在部署一个rails 6. x应用程序来AWS弹性豆茎,但无法获得要编译的资产。
我继续看到错误:
ActionView::Template::Error (Webpacker can't find application in /var/app/current/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:
{
}
):
在我的container_commands中,我有以下内容:
container_commands:
07_yarn_install:
command: "yarn install --check-files --force --production"
08_install_weback:
command: "sudo npm install --save-dev webpack"
09_install_babel:
command: "sudo npm install --save-dev babel-loader"
10_webpack:
command: "bundle exec rails webpacker:install"
11_asset_precompile:
command: "RAILS_ENV=production bundle exec rake assets:precompile"
我会尝试将命令11更新为:
命令:“bin/webpack”
我还必须确保我至少升级到webpacker版本5。