yarn
yarn copied to clipboard
If the cache folder is in an inaccessible place, yarn will fail every command
Bug description
yarn gets locked into an unusable state if the cache location is inaccessible, no commands work (not even yarn --version
or yarn --help
), meaning yarn config set cache-folder
doesn't work and the problem can't be fixed using the cli.
The following error message is shown:
error An unexpected error occurred: "EACCES: permission denied, mkdir '/media/usr/Data'".
info If you think this is a bug, please open a bug report with the information provided in "/home/usr/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/help for documentation about this command.
Only by editing the .yarnrc file the bug can be fixed.
Command
yarn config set cache-folder
What is the current behavior? yarn gets locked in an unnusable state
What is the expected behavior? yarn should be able to be configured out of an invalid state without manual setting of auto-generated files
Steps to Reproduce
1- set the yarn cache folder using the command yarn config set cache-folder /media/usr/Data/.yarn-cache
2- unmount the device
3- any yarn command will fail, including yarn config set cache-folder
Only solution currently is setting changing the config manually in the ~/.yarnrc file
Environment
- Node Version:
v12.1.0
- Yarn v1 Version:
1.17.3
- OS and version:
Linux Mint 19.3 Tricia
It's 2022 and this is still an issue, the entire yarn package manager has become completely fucked up. Nothing helps, not reinstalling node, absolutely nothing. I delete all yarn files and reinstall node and re-enable corepack and this is still fucked up. What the fuck is this?