wclr / yalc

Work with yarn/npm packages locally like a boss.
MIT License
5.64k stars 147 forks source link

Linking with own dependencies #174

Closed lublak closed 2 years ago

lublak commented 2 years ago

I currently have a module (1) with jsonata as a dependency. I then publish this module in the store of yalc. The node_modules are then not copied with makes sense since yalc itself acts as a store like npm. But now I use yalc add to link my own module (1), with the other module (2). Now the dependency of jsonata is missing. It is neither in the .yalc folder of the second module (2), nor in the store, nor anywhere else. Is this function wanted and if so is there an option to copy/install the dependencies like jsonata with it?

wclr commented 2 years ago

I believe it is still not possible to install deps automatically when using yalc link.

So you have two options:

1) add those deps in the parent package (as dev deps or something) 2) install manually running package manager installer inside .yalc/your-package

another way it to use yalc add (which will change host's package.json)

lublak commented 2 years ago

@wclr thanks for the answer, i now just copy node_modules manually to .yalc.