Join GitHub today
Yarn fails to install Electron from the "Offline mirror" folder #3590
Do you want to request a feature or report a bug?
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
The exception is:
This is my .yarnrc:
What is the expected behavior?
Please mention your node.js, yarn and operating system version.
I have the same error with typescript @types definitions that are not added to the offline mirror. If I remove the node_modules, turn off wifi and install --offline everything work but after clearing the cache I get the same error "Can't make a request in offline mode". I'm using Yarn 0.26.
@manuq Yarn 0.26 will log the name of package it failed to fetch now.
I think the issue may be with packages beginning with '@' not matching the lock file. The same thing happens with the packages installed by react create app: the package called
added a commit
Jun 9, 2017
This is still happening for me.
It is definitely available in my cache.
So great to see this resolved!
I remember trying to find an answer to this earlier this year with not resolve, and ended up switching back to npm. Since there was a constant back and forth from all three projects of who's module was causing the issue, there wasn't an answer (especially not this one). I no longer feel dirty being able to use Yarn again.
I did find that I continued to have this issue with 1.3.2, even with the node_modules removed. Once I cleared the cache, the install worked without a hitch and both the
I still have this issue with
The problem is caused by the
yarn offline mirrors appear to be completely broken, at least according to the instructions here https://yarnpkg.com/blog/2016/11/24/offline-mirror/ which appear to be the official documentation
there are 2 different bugs AFAICT:
bug 1. resolving scoped types when the yarn cache is populated. to repro, follow the steps in the offline-mirror blog post, DO NOT clean the cache, add (e.g.) rollup as a dependency, which depends on
bug 2. locating any offline packages after teh cache has been cleaned: again follow the steps in the offline-mirror blog post, add
this is with yarn 1.5.1:
and the lodash example
I have a Jenkins CI server building one of my projects almost daily using the offline cache (in a clean docker container that doesn't have any global yarn cache) and have never had an issue with it not resolving the packages in the offline cache.
If you look in the
Actually, you might be on to something here... it seems like sometimes the offline cache dir doesn't get all the package files put into it.
despite my project having 3 dependencies, only
So maybe it's hitting the cache and not copying packages to the offline mirror? Except that left-pad was also in my cache but that one was copied into the offline cache the first time... very weird.
Now I can't reproduce the thing I just saw above. The same commands do get all the packages intot he offline cache dir:
so... I'm not sure what happened when the files didn't end up in the offline cache dir. There must be some odd edge case that causes some packages to get skipped.
I thought I'd note this here as it seems somewhat still ongoing and my issue seems similar.
I seem to be running into a very similar odd edge case. We tried to add the package apidoc - https://github.com/apidoc/apidoc as a dev dependency and it doesn't seem to have added all of the necessary files to the offline cache, but only on Linux.
Running with NodeJs version 10
Maybe this is something different, but it's interesting that this is only causing problems on our Linux build. I haven't yet been able to try a newer version of yarn so I'm not sure if that would have any impact.
These also seem like dev dependencies of our dev dependencies, which I wouldn't think yarn should care about. Does yarn download all dev dependencies of every package?
(When using yarn 1.3.2 on another machine it does seem to include all missing packages so perhaps there's a bug introduced later causing this)