Skip to content

Provide a way to fallback to cached version when installing latest offline #2225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gaearon opened this issue Dec 12, 2016 · 1 comment · Fixed by #2471
Closed

Provide a way to fallback to cached version when installing latest offline #2225

gaearon opened this issue Dec 12, 2016 · 1 comment · Fixed by #2471
Assignees

Comments

@gaearon
Copy link
Contributor

gaearon commented Dec 12, 2016

Not sure if it's worth an RFC.
Yarn integration in Create React App is a bit disappointing, and there is a feature that could really help us out.

Create React App installs a package called react-scripts every time you run it. The idea is that this is the package with the “guts” of Create React App, and thus anytime you create a new project, you get the latest version of it. So people who don’t update the CLI still get new features.

However it doesn’t work offline. So if you’re in an airplane, you can’t create a React project. This is frustrating.

Ideally we’d like a way to tell Yarn that it should try installing latest version of a package but if that’s impossible, we’re fine falling back to the latest version that exists in the cache.

Note that I tried using --offline for this and it didn't work because it requested latest whereas we only have a specific version in cache (for example 0.8.4). I wish there was a way to "agree" to use whatever local version we have if there is no network connection.

I think this was mentioned as last paragraph in #1277 (comment) so it’s not exactly a new idea.

@voxsim
Copy link
Contributor

voxsim commented Jan 20, 2017

We should use --prefer-offline but it still does not work properly, this is a memo for the future :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants