-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Cannot install packages from github when offline #1925
Comments
There are conflicting interests here. When you define that the version of a package you want is a Github branch, then there's no way to know if you've got the most recent version of the code from the branch without connecting to Github and checking. Using a cached version could result an incorrect result. It seems like the See if |
@markstos Thanks. Your response makes sense to me. I will see if pointing the packages to specific Commit Id SHAs works. To answer your question about the
After that, zero packages are installed. Even the ones that are from properly published NPM packages. I also cannot find any documentation about these flags at https://yarnpkg.com/en/docs/cli/install. |
@gaearon also this is another issue that is related. |
Having the same issue. "warning There appears to be trouble with your network connection. Retrying..." The "npm-packages-offline-cache: directory includes all the .tgz files An example of the yarn.lock file includes:
|
@markstos I've tried this again with pointing to a specific git SHA instead of a branch name. I get the same thing. When I unplug my network cable, delete my I opened my |
Do you want to request a feature or report a bug?
Not sure
What is the current behavior?
Without an internet connection, I get:
And then the install fails and tells me which github address it was trying to reach on the internet.
If the current behavior is a bug, please provide the steps to reproduce.
Just make a
package.json
with a github dependency, such as:Install it via
yarn
while connected to the internet.Then unplug your internet, delete
node_modules
dir, and try toyarn
again.What is the expected behavior?
I expect it to install all my packages from cache even while offline.
Please mention your node.js, yarn and operating system version.
Node 6.9.1 LTS, yarn 0.17.4, Mac OS X 10.11.6
The text was updated successfully, but these errors were encountered: