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

error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/Users/xxx/Library/Caches/Yarn/npm-webpack-stream-3.2.0-d679c2f1f964b5abae4c1f29d5cb695115deec7b'". #1836

Closed
jrean opened this issue Nov 15, 2016 · 21 comments

Comments

@jrean
Copy link

jrean commented Nov 15, 2016

This bug happens now on both Linux and OsX.

  • OsX
    node v6.0.0
    npm 3.8.8
    yarn 0.17.0

  • Linux
    node 6.9.1
    npm 3.10.8
    yarn 0.17.0

I simply perform a yarn install

package.json

{
  "private": true,
  "scripts": {
    "prod": "gulp --production",
    "dev": "gulp watch"
  },
  "devDependencies": {
    "bootstrap-sass": "^3.3.7",
    "gulp": "^3.9.1",
    "jquery": "^3.1.0",
    "laravel-elixir": "^6.0.0-14",
    "laravel-elixir-webpack-official": "^1.0.2",
    "lodash": "^4.16.2"
  }
}

Error trace:

info No lockfile found.
[1/4] 🔍  Resolving packages...
warning gulp > vinyl-fs > glob-stream > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/Users/xxx/Library/Caches/Yarn/npm-webpack-stream-3.2.0-d679c2f1f964b5abae4c1f29d5cb695115deec7b'".
info If you think this is a bug, please open a bug report with the information provided in "/Volumes/data/code/fashion/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
@jrean
Copy link
Author

jrean commented Nov 15, 2016

Reverting to yarn 0.16.1 fixed my issue.
I hope the trace is helping.

@kossnocorp
Copy link

Locking to 0.16.1 helped me too

sebastian added a commit to Aircloak/aircloak that referenced this issue Nov 15, 2016
More up to date versions seem to have
problems resolving certain dependencies.

See: yarnpkg/yarn#1836
@antongb
Copy link

antongb commented Nov 15, 2016

OsX
node v6.6.0
npm 3.10.8
yarn 0.16.1

after running npm uninstall -g yarn and npm i -g [email protected] was getting the following error:

antons-MBP:yarn anton$ yarn
/Users/anton/.nvm/versions/node/v6.6.0/lib/node_modules/yarn/bin/yarn.js:48
      throw err;
      ^

Error: ENOENT: no such file or directory, open '/Users/anton/.nvm/versions/node/v6.6.0/lib/node_modules/yarn/updates/0.17.0/lib/cli/index.js'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.readFileSync (fs.js:508:33)
    at Object.Module._extensions..js (module.js:564:20)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/anton/.nvm/versions/node/v6.6.0/lib/node_modules/yarn/bin/yarn.js:40:22)

fixed by going to /Users/anton/.nvm/versions/node/v6.6.0/lib/node_modules/yarn/bin/yarn.js and changing possibles.push('../updates/current/lib/cli/index.js'); to possibles.push('../updates/0.16.1/lib/cli/index.js');

@juliankrispel
Copy link

👍 reverting to 0.16.1 fixed it for me thanks

sebastian added a commit to Aircloak/aircloak that referenced this issue Nov 15, 2016
More up to date versions seem to have
problems resolving certain dependencies.

See: yarnpkg/yarn#1836
@kostasmanionis
Copy link

Or you could remove the ~/.yarn/.roadrunner.json file after rollbacking.

@simonihmig
Copy link

I can confirm this. Happens for me with a github dependency. Here is the error.log:
yarn-error.txt

Reverting to 0.16.1 fixed this as well.

@kuntau
Copy link

kuntau commented Nov 15, 2016

👍 reverting to 0.16.1 give no error

@matoilic
Copy link

Same issue here with yarn 0.17. Reverting back to 0.16.1 and deleting ~/.yarn/.roadrunner.json resolved the issue.

yarn-error.txt

@derkjn
Copy link

derkjn commented Nov 15, 2016

Same issue with yarn 0.17.2

@thomaschaaf
Copy link
Contributor

This is a duplicate of #1834

@johannesschobel
Copy link

this issue still occurs from time to time in the 16.x and 17.x version of yarn.. haven't found a reliable and reproducible way to demonstrate it. And even worse - haven't found a proper solution to fix / address this issue..

@zlocate
Copy link

zlocate commented Aug 22, 2019

Use yarn at wsl debian and 2/3 installs had this error v1.17.3.
Sometimes helps purge yarn cache folder or run yarn as root (sudo)

@jomiojeda
Copy link

Same happened here on v1.19.1
fixed after
yarn cache clean

@gitowiec
Copy link

gitowiec commented Nov 5, 2019

I tried @jomiojeda advice but to no avail :(
I'm using Yarn 1.19.1 on Ubuntu 18.04.
@bestander This bug should be opened.

@kennethlynne
Copy link

I'm having this issue, and yarn cache clean did not improve anything. Using yarn 1.19.1, node 10.15.3

@cyptus
Copy link

cyptus commented Dec 10, 2019

got this issue when multiple agents were running builds at once and the cache directory was shared (AppData). Solved by changing the cache directory into the agents working directory.

@rekliner
Copy link

Also having this issue when multiple agents run builds simultaneously (envoyer.io). Separating cache directories with yarn config set cache-folder <unique dir> before running yarn is not preventing it in my case because the command is global and immediate so it steals the cache directory away from other sites that may be mid-launch. However sharing a directory almost always fails too.

@C-o-d-e-C-o-w-b-o-y
Copy link

having this now

@3h4x
Copy link

3h4x commented Jun 9, 2023

hitting this very often on our gh runner
yarn 1.22.19
node v20.0.0

@malmo-east
Copy link

Still have this issue. Using yarn 1.22.19 with node v18.17.1 on Mac

@sorenwacker
Copy link

Same on 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux yarn 1.22.19

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

No branches or pull requests