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

--link-duplicates error #2734

Closed
STRML opened this issue Feb 20, 2017 · 10 comments
Closed

--link-duplicates error #2734

STRML opened this issue Feb 20, 2017 · 10 comments
Labels

Comments

@STRML
Copy link
Contributor

STRML commented Feb 20, 2017

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

This is a bug in the pre-release 0.21.2 version with the --link-duplicates flag.

What is the current behavior?

Installing a project with @kadira/storybook and webpack@2 results in the following error:

error An unexpected error occurred: "EEXIST: file already exists, link '/home/git/forks/yarn-link-bug/node_modules/@kadira/storybook/node_modules/enhanced-resolve/node_modules/memory-fs/.npmignore' -> '/home/git/forks/yarn-link-bug/node_modules/babel-loader/node_modules/enhanced-resolve/node_modules/memory-fs/.npmignore'".

Please mention your node.js, yarn and operating system version.

Node 6.9.2, Yarn 0.21.2, OSX Sierra.

Reproduction Repository

A reproduction is available.

Ref: #2620 (comment) and this tweet. My preference would be for the feature to remain as it gives us significant (20%) size savings on our frontend project.

@felixfbecker
Copy link

felixfbecker commented Mar 28, 2017

I am meeting this too, essentially I cannot use the option because it doesn't work reliably.
I need every little speed improvement in the linking phase, since it seems like we will not see a no cache option in the near future (yarnpkg/rfcs#53)

@bestander
Copy link
Member

Can't fetch a private package IIRC An unexpected error occurred: "https://registry.yarnpkg.com/@kadira/storybook-addon-links/-/storybook-addon-links-1.0.1.tgz: Request failed "503 Service Unavailable"".

@bestander
Copy link
Member

I wonder if the error is related to @ in file path

@felixfbecker
Copy link

@bestander would it help if I figured out another reproduction case?

@bestander
Copy link
Member

Of course

@bestander
Copy link
Member

Even more help would be to find out the cause of the issue, the core linking logic is implemented here https://github.com/yarnpkg/yarn/blob/master/src/util/fs.js#L513 and here

await fs.hardlinkBulk(Array.from(hardlinkQueue.values()), this.reporter, {

@michaeloscarli
Copy link

Is this issue still being tracked?

@bestander
Copy link
Member

Afaik no one in the core team is actively working on fixing that, help from the community is expected.

@navarroaxel
Copy link

With the new [email protected] an error appears when I use --link-duplicates. This didn't happen with [email protected].

Steps to reproduce:

mkdir test && cd test
yarn add webpack webpack-stream webpack-dev-middleware --link-duplicates

result:

error An unexpected error occurred: "EEXIST: file already exists, link '/test/node_modules/uglifyjs-webpack-plugin/node_modules/enhanced-resolve/node_modules/memory-fs/.gitattributes' -> '/test/node_modules/webpack-dev-middleware/node_modules/enhanced-resolve/node_modules/memory-fs/.gitattributes'".

I tested it using several version combinations:
[email protected] and [email protected]
[email protected] and [email protected]

@bestander
Copy link
Member

looking into it now

bestander added a commit to bestander/yarn that referenced this issue Jun 21, 2017
bestander added a commit to bestander/yarn that referenced this issue Jun 21, 2017
bestander added a commit to bestander/yarn that referenced this issue Jun 24, 2017
bestander added a commit to bestander/yarn that referenced this issue Jun 26, 2017
bestander added a commit that referenced this issue Jun 26, 2017
* fixed #2734

* added another test

* fixes for Mael

* prettier

* added comment
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

5 participants