Symlink local dependencies #6251
Comments
cc @dylang interested in your opinion on this. Not trying to rally support for my issue, just curious. |
I agree. It also bothers me that it makes a mess of our globals and I'm compelled to regularly clean them out, especially when I wonder if I've ever |
I remember when everything |
I'm not opposed to this landing in npm eventually as a matter of principal (but I'm not the one you need to convince – @isaacs is the one who came up with the current setup for |
absolutely agree. It's silly that I'll have multiple copies of the same code in different places. |
+1000 I had made a comment looking for this I'm glad I carefully read this thread. Whats really bad is that the messaging around using |
@timoxley thanks for linklocal exactly what I was looking for |
Is there any chance of symlinks landing in the foreseeable future? To an outsider, something like |
I kinda stopped using |
I'd really like to have local package as symlinks. I don't see the point of having a copy of the files instead of a link, unless the module lives outside of my project (but then it is no longer a "local" package). My opinion is symlink should be the default behavior, but i might be wrong. |
@yoshuawuyts I had a similar change of heart, flat > nested in most cases. However, I'm not sure if I feel this way because it's better or because I've just grown tired of swimming upstream or perhaps both. |
yeah, it might be a bit of both for me - became tired of explaining all this stuff to people and debugging it across operating systems. Feel like flat hierarchies are generally good enough - especially when engineering it in such a way that stuff can be refactored out of the project at some point when needed - it's like eventual modularization (which can be admittedly tricky) |
The CLI team has pointed a lot of people who want something like this at Were an enterprising soul (say, perhaps, the original author of Because this isn’t something the CLI team is likely to get to in the next year or so, I’m going to close this feature request. Because this is also behavior the CLI team would be happy to see added to the CLI, I’ve added the |
Looks like this might be happening 🎉 See: #15900 |
This is a horrible idea, I cannot debug my apps in a monorepo, for example a dependency installs |
If you update your local dependency code, you should install the package again just as you would with any other dependency. Honestly WTH? |
It would be great if it were possible to symlink local dependencies during development, without using clobbering global links. Specifically, it'd be nice if npm could automatically link any dependencies in the package.json with relative, local paths.
Local dependencies in their current form do not create a very compelling workflow if you have multiple things depending on a single local dependency – each dependee must reinstall the local dependency after each change leading to possible strange behaviour whereby you have the "same" dependency installed in multiple locations, with the same version number, but different code.
First npm probably needs ability to do an
npm link
without using the global namespace.I've prototyped local linking as an external tool over here: https://github.com/timoxley/linklocal
edit: terrible english
The text was updated successfully, but these errors were encountered: