Skip to content
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

offline install failed due to git ls-remote unable to access github; as well as --prefer-offline config not works in .yarnrc #8638

Open
LouisSung opened this issue May 26, 2021 · 0 comments

Comments

@LouisSung
Copy link

LouisSung commented May 26, 2021

I realize that yarn 2.x has been released, I'll give it a try later

For now, I'm adopting the yarn@1.22.5 to Rocket.Chat in order to gain the offline installation feature
I've set up the cache-folder and yarn-offline-mirror, which can really keep the local files correctly (as shown in screenshot)
However, the yarn still try to invoke the git ls-remote even when running in the offline mode when yarn.lock file exists (without node_modules)

Besides, I tired to adopt --prefer-offline to all of the yarn install and yarn add commands with .yarnrc like mentioned in #6398
However, I've already tried the install.prefer-offline true, install.prefer-offline "", "--install.prefer-offline" true, install.prefer-offline "--dummy", etc. that any combination I could think of, and NON of them work :(
Does this feature still work in yarn@1.22.5 ?


  1. I wonder if there's any mechanism to bypass the git ls-remote or to ignore it (just keep running instead of force stop)
  2. How to set up default --prefer-offline with .yarnrc

Thank you very much :)

--
Environment:

  1. In Docker image (FROM node:12.22.1-buster-slim), simulate offline environment by docker run --network none
    • I could provide the Dockerfile I wrote if anyone need one (not commit and push yet)
  2. With/without using root user reach this error
  3. With/without keeping the yarn.lock reach this error too

image

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

No branches or pull requests

1 participant