Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

webpack - Rails Capistrano assets precompile took more than 10 minutes ~ or just stuck

Infra - EC2 (t2.micro)
Stack is using Rails 6.0.3, ruby 2.7.0.
Frontend stack is using tailwind css.
When execute cap staging deploy the assets precompile took longer than usually (sometimes it just stuck), until EC2 CPU usages is about 99%.

Am trying to find a better solution than compile it locally and deploy.

Is there any other solution can could speed up the precompile issues in staging & production? and yes I've tried the tailwindcss-rails gem and still facing the same issues.

Hope someone could point out he mistake I made.

00:11 deploy:assets:precompile
      01 /home/deploy/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
      01 yarn install v1.22.5
      01 [1/4] Resolving packages...
      01 [2/4] Fetching packages...
      01 info [email protected]: The platform "linux" is incompatible with this module.
      01 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
      01 info [email protected]: The platform "linux" is incompatible with this module.
      01 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
      01 info [email protected]: The platform "linux" is incompatible with this module.
      01 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
      01 [3/4] Linking dependencies...
      01 warning " > @tailwindcss/[email protected]" has incorrect peer dependency "tailwindcss@^1.0".
      01 warning " > @tailwindcss/[email protected]" has incorrect peer dependency "tailwindcss@^1.8.3".
      01 warning "@tailwindcss/ui > @tailwindcss/[email protected]" has incorrect peer dependency "tailwindcss@^1.5.0".
      01 warning " > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
      01 warning "webpack-dev-server > [email protected]" has unmet peer dependency "webpack@^4.0.0".
      01 [4/4] Building fresh packages...
      01 Done in 20.81s.
      01 yarn install v1.22.5
      01 [1/4] Resolving packages...
      01 [2/4] Fetching packages...
      01 info [email protected]: The platform "linux" is incompatible with this module.
      01 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
      01 info [email protected]: The platform "linux" is incompatible with this module.
      01 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
      01 info [email protected]: The platform "linux" is incompatible with this module.
      01 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
      01 [3/4] Linking dependencies...
      01 warning " > @tailwindcss/[email protected]" has incorrect peer dependency "tailwindcss@^1.0".
      01 warning " > @tailwindcss/[email protected]" has incorrect peer dependency "tailwindcss@^1.8.3".
      01 warning "@tailwindcss/ui > @tailwindcss/[email protected]" has incorrect peer dependency "tailwindcss@^1.5.0".
      01 warning " > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
      01 warning "webpack-dev-server > [email protected]" has unmet peer dependency "webpack@^4.0.0".
      01 [4/4] Building fresh packages...
      01 Done in 6.01s.
question from:https://stackoverflow.com/questions/65900842/rails-capistrano-assets-precompile-took-more-than-10-minutes-or-just-stuck

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...