umts / incidents

Operator incident report tracking for the Springfield and Valley Area Transit Companies
MIT License
1 stars 1 forks source link

Two fixes for yarn on deployment #501

Closed werebus closed 1 month ago

werebus commented 1 month ago

Rails 7 removed the tie between assets:precompile and yarn:install, meaning that deploys will fail because node_modules isn't there.

  1. Replace the connection to the yarn task
  2. Link the node_modules directory to speed up installs

Interestingly, I think some of our apps are just shuffling along with only #2 implemented. That is, they haven't actually installed new Node dependencies since the 7.0 upgrade, but asset precompilation doesn't fail because a(n old) node_modules directory exists.

werebus commented 1 month ago

BTW, I did a bit of a work-around in production, so deployment is currently working (as I described in the "Interestingly..." paragraph above").