You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i’ve been working on something for a while to help my company bootstrap packages better. it can optimize installation of external packages, and solve the issue with nested folders in package dependencies. i’m calling it bootstrap strategies.
in short, it allows you to customize your bootstrapping process with a "strategy" for local packages and external modules. i’m not sure if it’s the best way forward. perhaps just optimizing the current bootstrap process will suffice.
we're currently using the link strategy for local packages, which symlinks all of your packages to the root node_modules folder, and the root strategy for external modules, which installs all common external dependencies in the root node_modules folder (versioning is important for this to work properly). if done right, this will dramatically decrease install times.
this setup is achieved with lerna bootstrap --strategy=link:root after you're set up. instructions in the link above.
i'd like to remind everyone that once you've bootstrapped, symlinked modules in the node_modules folder can cause problems if you try to install more dependencies manually via npm install.
I don't know how good of an idea it is to have many different types of structures between Lerna repos. If someone wanted to build something on top of Lerna there would be way too many things they'd have to consider.
I pretty much came to the same conclusion shortly after I finished working on this. I'm more inclined to have 1 standard bootstrap process. However, I'd like to optimize it using the same techniques outlined here.
@rygine thanks for the work on bootstrap-strategies! The link strategy worked well for me and it might be good enough for me until there's a blessed solution. What are the standard pitfalls of symlinking with node_modules?
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Activity
jamiebuilds commentedon Jun 14, 2016
I don't know how good of an idea it is to have many different types of structures between Lerna repos. If someone wanted to build something on top of Lerna there would be way too many things they'd have to consider.
rygine commentedon Jun 14, 2016
I pretty much came to the same conclusion shortly after I finished working on this. I'm more inclined to have 1 standard bootstrap process. However, I'd like to optimize it using the same techniques outlined here.
jamiebuilds commentedon Jun 15, 2016
Yeah, I want to focus on just one way of handling things, whether that be pseudo-linking or real symlinks I don't know yet.
bradleyayers commentedon Jun 28, 2016
@rygine thanks for the work on bootstrap-strategies! The
linkstrategy worked well for me and it might be good enough for me until there's a blessed solution. What are the standard pitfalls of symlinking withnode_modules?lock commentedon Dec 28, 2018
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.