Ask A Question

Notifications

You’re not receiving notifications from this thread.

Running Yarn offline

Mountaindog asked in Servers

I have a production server Running Rails 6 (latest version) that is extremely locked down. I don't manage the infrastructure surrounding (firewalls, IPs, etc...) the server. Only a few things are allowed to connect and pass through. One of the challenges I'm facing is Yarn. Yarn seems to be tightly integrated into Rails 6, this is fine if the server can connect to the Yarn package repo but becomes a problem/nuisance when it can't. I've tried following this from Yarn without any success.
https://classic.yarnpkg.com/blog/2016/11/24/offline-mirror/

Whenever I run Yarn install --check-files, it returns 'can't connect ... ' or something like it, which is expected. If you need to precompile assets, open the console (rails c), and so on Yarn wants to run.

Any thoughts/guidance anyone can provide in managing Yarn on this machine would welcome.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 81,842+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.