wmr icon indicating copy to clipboard operation
wmr copied to clipboard

Packages are installed twice if used in yarn workspace

Open ghost opened this issue 4 years ago • 1 comments

In yarn workspaces, all packages are installed in the node_modules folder of the workspace, not in each project's folder. Because of this, what I think is happening is that WMR is looking at the node_modules inside the project folder and because it doesn't find the requested packages there, it downloads them.

ghost avatar Dec 24 '20 22:12 ghost

Interesting - I had assumed Yarn Workspaces would be setting up symlinks for this, but I guess they're relying on Node resolution looking into parent directories' node_modules. A prerequisite to WMR supporting this would be moving our npm cache files out of node_modules/*/.cache, which is something we already need to do in order to avoid writing to npm link'd project directories.

developit avatar Dec 28 '20 15:12 developit