yarn policies set-version x.xx
What is the current behavior?
When on Windows,
yarn policies set-version x.xx will set
.yarnrc file, however it will insert backslashes (
\\), rather than forward slashes
/. When then grabbing that repo on a non-Windows platform,
yarn is just broken, causing cryptic, unrecoverable error messages any time you use any yarn command (even the ones that are suggested to repair such errors):
Error: Cannot find module ‘/Users/xx/code/my-project/.yarn\releases\yarn-1.22.4.js’
What is the expected behavior?
Yarn should not break.
One possible way to fix it would be to have
yarn-path just use forward slashes.
If cross-platform is not desired, at least a proper error message would be useful.
- Node Version: (doesn’t matter too much)
- Yarn v1 Version: 1.22.4 (latest as of writing)
- OS and version: Running
yarn-policieson Windows, then trying to run it on non-Windows system.