It appears on Windows 10. I am using within Git Bash or the VSCode TTY but I think this is a platform-specific bug so my terminal shouldn't matter.
It involves having a Project A whose package.json contains a dependency of Project B which is behind a private github URL.
I have not verified if this bug occurs when referencing public URLs to git repositories instead of private ones.
It usually works fine the first time on any computer where I do a git clone and yarn install...
And when I made a Project C that is linked the same way inside Project A, via yarn add https://github.com/foo-org/project-c.git, it usually works fine to add a second github URL dependency.
But eventually, every time I try this, I get to the point where I need to add or remove one of these packages, or upgrade them, or just add another dependency... and that's when I can't get past the EINVAL mkdir error because it's trying to turn my github ref into something with a colon : character in it in the cache, which is illegal in MSDOS and windows filenames. This occurs with both yarn install and yarn add commands.
The first few times this happened, I was able to recover through some combination of rm -rf node_modules, rm yarn.lock, yarn cache clean. Now the only way I have found to recover is to modify package.json, turn the dependency into ../project-b instead of the github URL, and then cd ..; git clone https://github.com/foo-org/project-b.git to use the dependency locally rather than through node_modules.
This is a bug.
yarn-error.log
It appears on Windows 10. I am using within Git Bash or the VSCode TTY but I think this is a platform-specific bug so my terminal shouldn't matter.
It involves having a Project A whose package.json contains a dependency of Project B which is behind a private github URL.
I have not verified if this bug occurs when referencing public URLs to git repositories instead of private ones.
It usually works fine the first time on any computer where I do a
git clone
andyarn install
...And when I made a Project C that is linked the same way inside Project A, via
yarn add https://github.com/foo-org/project-c.git
, it usually works fine to add a second github URL dependency.But eventually, every time I try this, I get to the point where I need to add or remove one of these packages, or upgrade them, or just add another dependency... and that's when I can't get past the EINVAL mkdir error because it's trying to turn my github ref into something with a colon
:
character in it in the cache, which is illegal in MSDOS and windows filenames. This occurs with bothyarn install
andyarn add
commands.The first few times this happened, I was able to recover through some combination of
rm -rf node_modules
,rm yarn.lock
,yarn cache clean
. Now the only way I have found to recover is to modify package.json, turn the dependency into../project-b
instead of the github URL, and thencd ..; git clone https://github.com/foo-org/project-b.git
to use the dependency locally rather than through node_modules.