yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.44k stars 2.73k forks source link

yarn issue invalid distance too far and no yarn-metadata.json file found #5308

Open msimonian77 opened 6 years ago

msimonian77 commented 6 years ago

I'm just trying to install the simple react app: npx create-react-app my-app But getting this error from yarn:

Installing react, react-dom, and react-scripts... yarn add v1.3.2 info No lockfile found. [1/4] Resolving packages... [2/4] Fetching packages... error https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz: invalid distance too far back error https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz: invalid distance too far back [3/4] Linking dependencies... error An unexpected error occurred: "ENOENT: no such file or directory, open 'C:\Users\...\AppData\Local\Yarn\cache\v1\npm-fsevents-1.1.3-11f82318f5fe7bb2cd22965a108e9306208216d8\.yarn-metadata.json'". info If you think this is a bug, please open a bug report with the information provided in "V:\...\my-app\yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. Aborting installation. yarnpkg add --exact react reac-dom react-scripts --cwd V:\GXP\my-app has failed.

Here are the versions of node (v8.9.4) yarn (v1.3.2) I'm on windows 10

msimonian77 commented 6 years ago

the log has this error: Error: EPERM: operation not permitted, mkdir 'C:\Users...\AppData\Local\Yarn\cache\v1'

But if i go to the C:\Users...\AppData\Local\Yarn\cache\v1 directory there are tons of npm- directories created.

msimonian77 commented 6 years ago

I had to use the --use-npm flag to pass this issue but this is a problem with yarn that needs to be fixed.