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

Git LFS not supported #1337

Open
scarlac opened this issue Oct 21, 2016 · 4 comments
Open

Git LFS not supported #1337

scarlac opened this issue Oct 21, 2016 · 4 comments

Comments

@scarlac
Copy link

scarlac commented Oct 21, 2016

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Installed packages that depend on Git LFS will fail. Ie. if the package has a postinstall script that unzips a large tar file, that is stored via Git LFS then the tar command will fail since it's not an actual tar file but a text file with a LFS reference.

If the current behavior is a bug, please provide the steps to reproduce.

  1. yarn add somepackage (which has a tar file via Git LFS in it and uses postinstall script to untar it)
  2. yarn fails installation:
[2/2] ⠂ somepackage
[-/2] ⠂ waiting...
[-/2] ⠂ waiting...
error /Users/seph/jobs/someproject/node_modules/somepackage: Command failed.
Exit code: 1
Command: sh
Arguments: -c tar -zxvf ios/lib/largefile.tar.gz -C ios/lib/
Directory: /Users/seph/jobs/someproject/node_modules/somepackage
Output:
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
info Visit https://yarnpkg.com/en/docs/cli/upgrade for documentation about this command.

What is the expected behavior?
tar file is fetched via git-lfs, postinstall script runs, and tar succeeds.

Please mention your node.js, yarn and operating system version.
node: v6.9.1
yarn: v0.16.1
macOS: 10.12 (16A323)

This issue seems related to these NPM issues:
npm/npm#10857
npm/npm#11151

@stepankuzmin
Copy link

Any news?

@JonesN3
Copy link

JonesN3 commented Nov 1, 2017

This does not work git git+ssh dependencies, which seems weird to me since, as far as I understand, yarn caches the full git repo with git clone for such dependencies.

@bensonz
Copy link

bensonz commented Jun 12, 2018

Any update on this? yarn install still does not support files that are stored with git-lfs
My yarn version is v1.5.1

@kanuck
Copy link

kanuck commented Mar 12, 2021

Pretty sure LFS support has been implemented for some time (modulo bugs), but one way this issue can still manifest is with stale yarn cache entries. If at some point the cache was populated prior to installing/configuring git lfs on your client, then it will have saved the LFS reference pointer file instead of the actual binary. Try cleaning the yarn cache before running yarn install.

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

No branches or pull requests

7 participants