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

a git dependency defined as url cannot be updated-fails with a git conflict in my cache #2743

Closed
capaj opened this issue Feb 21, 2017 · 5 comments
Labels

Comments

@capaj
Copy link

capaj commented Feb 21, 2017

I am on yarn 0.20.3

What is the current behavior?
I have a url in my deps: "trae": "https://github.com/capaj/trae.git",
I run yarn
I make a commit to https://github.com/capaj/trae.git repo.
I run yarn add https://github.com/capaj/trae.git to get the latest version from my repo
I get:

y add https://github.com/capaj/trae.git
yarn add v0.20.3
[1/4] Resolving packages...
error Command failed.
Exit code: 128
Command: git
Arguments: pull
Directory: /home/capaj/.cache/yarn/.tmp/a0218de46c09eeeba3aa6e9bed4d0f17
Output:
error: Pull is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

What is the expected behavior?
Expected is that it install the trae package from my github url fine without any git errors.

Ubuntu 16.10, Node 7.5.0

@bestander bestander changed the title a dependency defined as url cannot be updated-fails with a git conflict in my cache a git dependency defined as url cannot be updated-fails with a git conflict in my cache Feb 22, 2017
@bestander
Copy link
Member

Yarn clones git dependencies into a cache folder.
I think it tries to reuse the same folder second time, that might be hard because Yarn may copy some files into cache during linking phase.
I suppose instead of updating it should create a new cache folder if HEAD changed.
PR is welcome

@tom10271
Copy link

What can I do if I face this problem?

@BYK
Copy link
Member

BYK commented Aug 11, 2017

What can I do if I face this problem?

I would try the latest nightly since this seems to be solved on master.

@BYK BYK closed this as completed Aug 11, 2017
@remotealex
Copy link

Deleting the tmp dir fixes the issue too

Directory: /Users/alexprice/Library/Caches/Yarn/v1/.tmp/a71eb20c6f8366926c96610aa7b336f4
....

$ rm -rf ~/Library/Caches/Yarn/v1/.tmp/a71eb20c6f8366926c96610aa7b336f4

@joshuapinter
Copy link

You can fixed this by running yarn cache clean as well.

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

No branches or pull requests

6 participants