Closed ataylor32 closed 1 year ago
npx link
and npm
are completely unrelated tools.
npm install
enforces the integrity of node_modules
by making sure its contents are mapped to the right directories. Deleting existing files (e.g. symlinks) is a side effect of this.
Therefore, both tools are behaving expectedly.
In the perspective of npx link
, npm install
deleting the symlinks is just as arbitrary as some user manually deleting the symlinks. npx link
is not involved or aware of that happening. And it's not a npx link
bug that someone or something decides to delete the symlinks it creates.
Feature request
Currently, my link.config.json file has one symlink set up. Running
npx link
creates the symlink, as expected. However, if I runnpm install <package>
, the symlink gets deleted and I have to runnpx link
again to recreate it. I don't know if this is the intended behavior or not. If it's not intended then you can consider this issue a bug report. But if it is intended then I think it should be mentioned in the README.Motivations
I don't think I'm the only one who will ever encounter this.
Alternatives
No response
Additional context
No response
Contributions