“ENOENT: no such file or directory” when running Yarn for Babel

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 > node-uuid@1.4.8: Use uuid module instead
[3/5] Fetching packages...
info fsevents@1.1.2: The platform "win32" is incompatible with this module.
info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "babel-loader@7.1.1" has incorrect peer dependency "babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc".warning "babel-loader@7.1.1" has incorrect peer dependency "webpack@2 || 3".
warning "ajv-keywords@1.5.1" has incorrect peer dependency "ajv@>=4.10.0".
warning "eslint-config-babel@7.0.1" has incorrect peer dependency "babel-eslint@^7.0.0".
warning "ajv-keywords@2.1.0" has incorrect peer dependency "ajv@>=5.0.0".
warning "uglifyjs-webpack-plugin@0.4.6" 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.

  1. Clone https://github.com/babel/babel
  2. Run yarn

What 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

Author: Fantashit

1 thought on ““ENOENT: no such file or directory” when running Yarn for Babel

  1. @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

Comments are closed.