Do you want to request a feature or report a bug?
Reporting a bug, on Windows, which Yarn has that npm does not.
What is the current behavior?
Yarn will create a junction to a file, which is not allowed (ref: docs.microsoft.com. This causes problems for anything that enumerates files under the node_modules tree, which will crash out with a 0x8007010b: Directory Name Invalid error.
If the current behavior is a bug, please provide the steps to reproduce.
yarn add acorn (for example)
Look in node_modules\acorn\.bin\, note the presence of a junction to ...Yarn\Cache\v3\npm-acorn-6.0.2-6a459041c320ab17592c6317abbfdf4bbaa98ca4\node_modules\acorn\bin\acorn
Note also that this acorn is a file, not a folder.
If you look at the node_modules\acorn\.bin folder in windows explorer, acorn is shown as a shortcut to a folder, and double clicking on it results in the error "The filename, directory name, or volume label syntax is incorrect."
Note that with npm, there is no .bin folder in node_modules\acorn\, and no invalid junction.
What is the expected behavior?
If there has to be a link to a file, it should be a symlink, and not a junction.
Please mention your node.js, yarn and operating system version.
Node.js: 8.11.2
Yarn: 1.11.0
OS: Windows 7
Is there a workaround to this issue temporarily? Having this exact issue and need to build on Windows.
I used the following powershell command to remove all the .bin folders except the main root one:
get-childitem -directory -path node_modules/*/* -filter ".bin" -recurse -EA SilentlyContinue | where FullName -NotLike "*\node_modules\.bin" | % { cmd /c rmdir /s /q $_.FullName }
Can't guarantee that it won't stop any of your dependencies from working properly, but mine were all fine.
This is also causing me a problem as it's preventing removal of node_modules using git clean.
Hey everyone. We hit this problem yesterday on our build servers. For now we are using yarn version 1.10.1 and this has resolved our issues.
On latest we were getting the .bin Junction created inside one of our node_modules and when trying to access we got the same message: "The filename, directory name, or volume label syntax is incorrect."
Not ideal to force use an older version of yarn but it's allowed us to continue working and hopefully if the problem is resolved we can use latest again.
This breaks electron-updater on Windows. Getting ENOENT due to the bad symlinks for esparse in the esprima .bin folder
We are experiencing this issue with our local development machines (Yarn 1.12.3, Windows 10) and our build Server (Yarn 1.12.3, Windows Server 2012 R2). Reverting to Yarn 1.10.1 per @Gerwinnz's suggestion resolves the issue for the short term.
I think you can use yarn install --no-bin-links with the latest and it
won't create the bad symlinks
On Thu, Nov 29, 2018, 9:00 PM Ryan Taylor notifications@github.com wrote:
We are experiencing this issue with our local development machines (Yarn
1.12.3, Windows 10) and our build Server (Yarn 1.12.3, Windows Server 2012
R2). Reverting to Yarn 1.10.1 per @Gerwinnz https://github.com/Gerwinnz's
suggestion resolves the issue for the short term.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/yarnpkg/yarn/issues/6450#issuecomment-443063393, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABlGHfB8wF2WuHpGsZvR22Z8pErSUorQks5u0JE8gaJpZM4W-Omq
.
Most helpful comment
Hey everyone. We hit this problem yesterday on our build servers. For now we are using yarn version
1.10.1and this has resolved our issues.On latest we were getting the
.binJunction created inside one of our node_modules and when trying to access we got the same message: "The filename, directory name, or volume label syntax is incorrect."Not ideal to force use an older version of yarn but it's allowed us to continue working and hopefully if the problem is resolved we can use latest again.