Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I'm not sure if this is a Yarn issue or a Babel issue, but when I run yarn within the babel directory, I get this error:
error An unexpected error occurred: "ENOENT: no such file or directory, lstat 'C:\\Users\\Daniel\\AppData\\Local\\Yarn\\cache\\v1\\npm-babel-cli-7.0.0-alpha.18'".
There's also a whole bunch of errors like "The case-insensitive file [...] shouldn't be copied twice in one bulk copy", not sure if they're related.
Full output
yarn install v0.28.4
[1/5] Validating package.json...
[2/5] Resolving packages...
warning workspace-aggregator-2f8b673f-5ade-4862-bde2-9fb415da2a97 > babel-standalone > npm-check-updates > npm > request > [email protected]: Use uuid module instead
[3/5] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "[email protected]" has incorrect peer dependency "babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc".warning "[email protected]" has incorrect peer dependency "webpack@2 || 3".
warning "[email protected]" has incorrect peer dependency "ajv@>=4.10.0".
warning "[email protected]" has incorrect peer dependency "babel-eslint@^7.0.0".
warning "[email protected]" has incorrect peer dependency "ajv@>=5.0.0".
warning "[email protected]" has incorrect peer dependency "webpack@^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0".
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\abbrev shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\ansi-regex shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\aproba shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\hosted-git-info shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\npmlog shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\rimraf shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\semver shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\validate-npm-package-name shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\which shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\write-file-atomic shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\abbrev\abbrev.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\abbrev\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\abbrev\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\abbrev\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\ansi-regex\index.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\ansi-regex\license shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\ansi-regex\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\ansi-regex\readme.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\aproba\index.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\aproba\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\aproba\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\aproba\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\hosted-git-info\.npmignore shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\hosted-git-info\git-host-info.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\hosted-git-info\git-host.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\hosted-git-info\index.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\hosted-git-info\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\hosted-git-info\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\hosted-git-info\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\AUTHORS shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\lib shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\node_modules shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\npmlog\CHANGELOG.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\npmlog\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\npmlog\log.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\npmlog\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\npmlog\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\.npmignore shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\.travis.yml shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\doc shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\duplex.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\lib shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\passthrough.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\readable.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\transform.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\writable.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\.eslintrc shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\.npmignore shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\.travis.yml shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\CHANGELOG.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\codecov.yml shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\CONTRIBUTING.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\index.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\lib shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\request.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\rimraf\bin.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\rimraf\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\rimraf\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\rimraf\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\rimraf\rimraf.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\semver\bin shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\semver\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\semver\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\semver\range.bnf shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\semver\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\semver\semver.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\validate-npm-package-name\.npmignore shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\validate-npm-package-name\index.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\validate-npm-package-name\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\validate-npm-package-name\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\validate-npm-package-name\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\validate-npm-package-name\test shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\which\bin shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\which\CHANGELOG.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\which\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\which\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\which\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\which\which.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\write-file-atomic\index.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\write-file-atomic\LICENSE shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\write-file-atomic\package.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\write-file-atomic\README.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\lib\extract_description.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\lib\fixer.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\lib\make_warning.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\lib\normalize.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\lib\safe_format.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\lib\typos.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\normalize-package-data\lib\warning_messages.json shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\doc\stream.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\doc\wg-meetings shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\lib\internal shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\lib\_stream_duplex.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\lib\_stream_passthrough.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\lib\_stream_readable.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\lib\_stream_transform.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\lib\_stream_writable.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\lib\auth.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\lib\cookies.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\lib\getProxyFromURI.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\lib\har.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\lib\helpers.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\lib\multipart.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\lib\oauth.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\lib\querystring.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\lib\redirect.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\request\lib\tunnel.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\semver\bin\semver shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\validate-npm-package-name\test\index.js shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\which\bin\which shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\doc\wg-meetings\2015-01-30.md shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\lib\internal\streams shouldn't be copied twice in one bulk copy
warning The case-insensitive file C:\src\babel\node_modules\npm\node_modules\readable-stream\lib\internal\streams\BufferList.js shouldn't be copied twice in one bulk copy
error An unexpected error occurred: "ENOENT: no such file or directory, lstat 'C:\\Users\\Daniel\\AppData\\Local\\Yarn\\cache\\v1\\npm-babel-cli-7.0.0-alpha.18'".
info If you think this is a bug, please open a bug report with the information provided in "C:\\src\\babel\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Log: yarn-error.log
This may have broken with Babel's move to workspaces?
If the current behavior is a bug, please provide the steps to reproduce.
yarnWhat is the expected behavior?
It works
Please mention your node.js, yarn and operating system version.
Node.js 7.8.0, Windows 10 64-bit (insider preview 16193)
cc @hzoo
I tried with Ubuntu on Windows (Windows Subsystem for Linux) and hit a similar error:
error An unexpected error occurred: "EIO: i/o error, lstat '/mnt/c/src/babel/packages/babel-helper-transform-fixture-test-runner/node_modules/babel-core'".
The case insensitive one is https://github.com/yarnpkg/yarn/issues/3751
Hmm works fine for me but i'm using osx. (I didn't reclone either) works. Also we do make bootstrap after cloning (it does run yarn to install though)
@Daniel15 - I've put in some changes around this after 0.28.4 - Can you try with the latest nightly.
It looks like it may also be a race condition with concurrent yarn installations.
I can replicate this with latest nightly. Looks like the error is thrown here. fs.realpath is being passed a path that doesn't exist in this case.
@aracarie thanks a lot for the help! How did you replicate? Just run yarn add babel?
I can replicate this.
Seems like this is coming from workspaces. Not sure about the root cause but I have a workaround for now.
Okay after a very interesting debugging session, @arcanis and I found that this is because there are version mismatches in babel's package.json and the actual packages in its workspace. Looks like all the packages are at alpha.19 but in the top level package.json, some are explicitly referred as alpha.18 without a range.
Normally, the intended way of workspaces was to silently ignore this and install the requested version from NPM. But since now we see that this is a common mistake that people may make, we want to do something different. Here are the options:
package.json/workspaces (which means this becomes an object instead of an array) to determine the behavior: allow version mismatches and always use the one from workspaces or always use the one from npm and don't warn me about it.yarnrc instead of in package.json.My personal opinion is to go with option 1, since I think this is almost always an error. @arcanis is less opinionated and he favors option 2. I think that's also reasonable but printing warnings when this actually is the expected behavior sounds wrong to me since it would reduce the value of warnings.
What do you guys think?
@BYK the reason why the packages are at alpha.19 is and the top level is alpha.18 is because I can't make them the same version otherwise it would link the top level node_modules with the rest with workspaces and then babel wouldn't be able to build itself because it wouldn't create the lib/ from src in each package? And it's explicit in the alpha stage since packages can break one another. We can change this on babel's end if ^ is better but I thought it would match against the latest alpha and end up with the same issues
Okay, finally understood what's happening. babel-cli is listed as a package so it is added as a dependency of the virtual workspaces manifest. That said, that version of babel-cli is never used, instead the previous version from npm is used. Thus, the babel-cli from the repo is never placed/linked in anywhere but still listed as a dependency of the workspace and this fails when we try to create its bin links.
Wow interesting find, glad Babel is testing it well 馃槃 ?
Yeah, please continue breaking our stuff 馃槢
@hzoo keep moving and break things please and many thanks :D
Cool, this seems to work for me now on nightly build v1.0.0-20170811.1240.
Wow this is something I came across my self testing out babel@7-alpha for the first time also using WSL.
Is there any workaround for right now for this issue? Cleaning out a cache or something to invalid links?
@TheLarkInn Upgrade to a newer Yarn nightly build. v1.0.0-20170811.1240 is working fine for me, but anything newer should be OK too.
Awesome I'll check documentation to see how to fetch nightly builds. Thank you.
Thank you!!! Gave it a try and no luck, similar error. I'm going to attempt to later when I have time to blow out and re clone and install deps to verify. Just incase I submitted an issue,
I confirm that the nightly have this fixed! My packages can use a bin from another package of the workspace. Yay!
馃帀
Most helpful comment
@BYK the reason why the packages are at alpha.19 is and the top level is alpha.18 is because I can't make them the same version otherwise it would link the top level node_modules with the rest with workspaces and then babel wouldn't be able to build itself because it wouldn't create the
lib/fromsrcin each package? And it's explicit in the alpha stage since packages can break one another. We can change this on babel's end if ^ is better but I thought it would match against the latest alpha and end up with the same issues