privatenumber / link

🔗 A better `npm link`
193 stars 8 forks source link

[Question] How to include dependents of a linked package to the original project? #15

Closed Marc19 closed 11 months ago

Marc19 commented 1 year ago

I'm using npx link to add a symlink for a Common project of mine and use it inside Project-A and Project-B. Project-A and Project-B have a package.json that look like this:

"dependencies": {
...,
"common.ui": "file:../path-to-common-project",
...
}

I can't remember the order of steps I did but for some reason, it worked as expected once but it's not working anymore. What I mean by "it worked" is that:

symlinked

links

links-without-extraneous-libs

I first thought that Project-B has some different configuration but then I removed all the created links for Project-A by running npm unlink --no-save common.ui and tried to re-add them once again but this time it didn't work. I could only see the Common project linked without its 3rd party libraries.

Do you know why could that be the case? Am I missing something? Is there something I should do before linking a project?

privatenumber commented 11 months ago

Sorry, I don't really understand what you're saying.

But based on the question in the title of this issue, I think it will be solved by https://github.com/privatenumber/link/issues/13

If not, can you succinctly describe your goal/problem (without describing what you tried and what not)? Happy to re-open if different.