对rails 6上的rails 6,bootstrap 4,webpacker进行故障排除

问题描述 投票:0回答:2

Heroku部署失败。所以我尝试在本地做同样的问题。

$ NODE_ENV=production RAILS_ENV=production rails assets:precompile --trace
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke yarn:install (first_time)
** Execute yarn:install
yarn install v1.13.0
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > [email protected]" has unmet peer dependency "webpack@^4.0.0".
warning "webpack-dev-server > [email protected]" has unmet peer dependency "webpack@^4.0.0".
[4/4] 🔨  Building fresh packages...
✨  Done in 7.99s.
** Execute assets:precompile
I, [2019-04-16T12:10:11.016887 #96897]  INFO -- : Writing /private/tmp/template-a32b218/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css
I, [2019-04-16T12:10:11.017485 #96897]  INFO -- : Writing /private/tmp/template-a32b218/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css.gz
** Invoke webpacker:compile (first_time)
** Invoke webpacker:verify_install (first_time)
** Invoke webpacker:check_node (first_time)
** Execute webpacker:check_node
** Invoke webpacker:check_yarn (first_time)
** Execute webpacker:check_yarn
** Invoke webpacker:check_binstubs (first_time)
** Execute webpacker:check_binstubs
** Execute webpacker:verify_install
** Invoke environment 
** Execute webpacker:compile
Compiling…
Compilation failed:

$ echo $?
1
heroku webpacker ruby-on-rails-6
2个回答
0
投票

找到了我自己的问题的答案。

config/webpacker.yml中,有一个布尔选项可以使输出更加冗长。它告诉我,我的一个包含声明中有一个拼写错误。


0
投票

如果您在应用程序中实际使用包之前忘记进行“添加纱线”,Webpacker可以静默挂起。

© www.soinside.com 2019 - 2024. All rights reserved.