Re-create, in the copy, every symlink the original holds. cp -Rc
dereferences symlinks: the workspace links under node_modules/@scope/
become stale copies of sibling packages, and the node_modules/.bin
entries become scripts whose relative requires resolve from the wrong
directory. Both are fixed by the same pass, so it runs after every copy
rather than only after a clone — where the copy preserved the links
already, re-creating them changes nothing.
Link targets are carried over verbatim: the two trees have the same shape,
so a relative link means the same thing in both.
Re-create, in the copy, every symlink the original holds.
cp -Rcdereferences symlinks: the workspace links undernode_modules/@scope/become stale copies of sibling packages, and thenode_modules/.binentries become scripts whose relative requires resolve from the wrong directory. Both are fixed by the same pass, so it runs after every copy rather than only after a clone — where the copy preserved the links already, re-creating them changes nothing.Link targets are carried over verbatim: the two trees have the same shape, so a relative link means the same thing in both.