14

I have a Lerna project which until recently was using lerna bootstrap --hoist. This worked well but I found the devDependencies in the many sub folders were mostly identical. Upgrading to Lerna v3 I read about lerna link convert.

Does lerna link convert simply move all the sub folder devDependencies into root, and sub folders scan the parent node_modules to load them (a feature of NPM)? I've noticed dependencies within the sub-folders are changed to "file://" instead of the private npm store which indicates once published and consumed they wouldn't be loaded.

Also if lerna bootstrap is dropped then dependencies within the sub modules aren't installed. What method is used to resolve this?

user2965155
  • 319
  • 3
  • 6

1 Answers1

-4

My recommendation would be to take advantage of Yarn Workspaces' ability to "hoist" packages to the root level. This will prevent having identical dependencies nested in your packages.

Here's a completed example and the associated tutorial.

leerob
  • 2,876
  • 1
  • 18
  • 38