Clarification on using Lerna for package management
This question is about Lerna, a JavaScript monorepo management tool, and isn't specifically related to Sanity. You might get better answers in a general JavaScript/Node.js community forum.
That said, to directly answer: No, lerna run build --parallel does not automatically run npm install in each package. The lerna run command only executes the specified npm script in packages that have it defined—it assumes dependencies are already installed.
You need to install dependencies separately first:
# Install dependencies first
lerna bootstrap
# OR
npm install # (if using npm workspaces)
# Then run build
lerna run build --parallelIf you're asking this because you're working with a Sanity project that uses Lerna (some older Sanity monorepo setups do), the same principle applies—you'll need to run the dependency installation step before building.
For Sanity-specific questions about project setup, Studio configuration, GROQ queries, Content Lake, or any other Sanity features, I'm here to help! Feel free to ask anything related to Sanity's platform, APIs, or integrations.
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.