Open kubijo opened 5 years ago
Our current hacky way around this is
find . -maxdepth 1 -type l | xargs --no-run-if-empty -i mv {} packages/xyz/node_modules/
I encounter the same issue sometimes. Not just into the root, the symlinks would occasionally be created into the wrong folder for the package include a scope. For example, I have 2 dependencies: '@material-ui/core', '@ckeditor/ckeditor5-react', sometimes, the symlink for 'core' would go to the folder '@ckeditor'.
btw, my ENV is macOS Mojave 10.14.4, node v11.12.0.
I'm also experiencing this when packaging for our production deploys. For now I haven't noticed it in other situations, and I'm addressing by correctly setting NODE_ENV=production
and not running flow-mono (should have been doing this all along), but it worries me that this could happen at any time.
Hi.
Did you ever encounter a behavior where the
create-symlinks
commands occasionaly miss-places symlinks from the rootnode_modules
into the root, instead ofpackages/*/node_modules/
?To possibly illustrate this more clearly:
The
↗ addon-notes
is the misplaced link tonode_modules/addon_notes/
. It should be inpackages/xyz/node_modules/
, but it's missing there (so it's not a copy, but rather a misfire).We've bump into this because it fails our lint CI jobs as it get's picked up by eslint, but would eventually cause flow errors as well since the module wouldn't be found in the package…
As of yesterday this started to happen semi-regularly on my dev machine as well (like 2 out of 4 tries).
If you have a hunch for a place that might be the culprit for some race-condition type of error, I'd be ready to help with tracking it down.