Whenever I try to yarn
I get:
error An unexpected error occurred: "ENOENT: no such file or directory, open '/Users/Adam/Library/Caches/Yarn/v1/npm-gulp-4.0.0-alpha.2-311322480cff736e0f423389352d202c97f530e0/.yarn-metadata.json'".
I need to remove the yarn.lock
file for it to work. Then after install, running yarn again fails with the same error.
Not sure why this started happening. This is with yarn 0.28.4 on OS X. I can’t upgrade to 1.0.0 due to it failing completely on Heroku.
Please let me know what I can do to help you debug this. The package it’s failing on is "gulp": "git+https://github.com/gulpjs/gulp#4.0",
I got this error today in Yarn v1.6.0, OSX 10.13.4 while linking a dependency installed from a private GitHub repository.
The solution for me was a
yarn cache clean
and a retry, worked like a charm.For anyone still struggling with this, my problem was that the shasum checksum for the offending package was wrong in
yarn.lock
. I downloaded the package and calculated the shasum. Changed the checksum inyarn.lock
to this and it’s working now. I remember us having a similar issue before, with this same package and I don’t remember what we did to fix it the last time. So this may not be a permanent fix andyarn
may change to the wrong checksum sometime later, but it works for now.