Rails Webpacker似乎需要永恒才能编译

时间:2017-07-13 11:01:38

标签: ruby-on-rails capistrano webpacker

使用Capistrano,我注意到当用current -> /var/www/myapp创建一个符号链接时,需要一个永恒的编译。事实上,我等了大约5到10分钟并取消了这个过程。

它挂在这一部分:

00:09 deploy:assets:precompile
      01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
      01 yarn install v0.27.5
      01 [1/4] Resolving packages...
      01 [2/4] Fetching packages...
      01 warning fsevents@1.1.2: The platform "linux" is incompatible with this module.
      01 info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
      01 [3/4] Linking dependencies...
      01 [4/4] Building fresh packages...

如果删除current符号链接,它仍然需要一段时间,但它会完成。

00:09 deploy:assets:precompile
      01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
      01 yarn install v0.27.5
      01 [1/4] Resolving packages...
      01 [2/4] Fetching packages...
      01 warning fsevents@1.1.2: The platform "linux" is incompatible with this module.
      01 info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
      01 [3/4] Linking dependencies...
      01 [4/4] Building fresh packages...
      01 Done in 134.00s.
      01 Webpacker is installed  
      01 Using /var/www/html/myapp/releases/20170713104316/config/webpacker.yml file for setting up webpack paths
      01 [Webpacker] Compiling assets 
      01 [Webpacker] Compiled digests for all packs in /var/www/html/myapp/releases/20170713104316/app/javascript/packs:
      01 {"application.css"=>"/packs/application.css", "application.css.map"=>"/packs/application.css.map", "application.js"=>"/packs/application-54a7cd537f4d8d13646…

大约134s。

首次使用Capistrano和webpacker进行部署,是正常还是有解决方案来缩短编译时间?

0 个答案:

没有答案