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
Has there been progress on any sort of monorepo dependency support? (Such as a Yarn workspace-adjacent feature)
There was a conversation on npm.community (here: https://npm.community/t/npm-needs-a-more-robust-story-for-local-multi-module-development/1059/2) that stated it was in the works, and I wanted to make sure this made it back here for discussion as there are some people still awaiting this feature. While this particular issue that's linked is referring to local development, it points to the larger functionality for monorepos.
When
n/a
Where
n/a
How
I'm not sure
Current Behavior
There isn't support for this specific functionality. There are a few workarounds - one being traversing through each directory with a package.json and installing/updating the node modules.
Expected Behavior
Running an npm install/npm ci will create/reference a single root package-lock.json file and populate the node modules for a subdirectories of the mono repo.
Similar to yarn workspaces, there would be a way to reference subdirectories to each other also (although, this could be a separate feature).
Example:
- /app
- package.json
- package-lock.json // -> resolves dependencies from root dir and sub dirs
- /subdir1
- package.json
- /subdir2
- package.json // -> dependency of "subdir1"
What / Why
Has there been progress on any sort of monorepo dependency support? (Such as a Yarn workspace-adjacent feature)
There was a conversation on npm.community (here: https://npm.community/t/npm-needs-a-more-robust-story-for-local-multi-module-development/1059/2) that stated it was in the works, and I wanted to make sure this made it back here for discussion as there are some people still awaiting this feature. While this particular issue that's linked is referring to local development, it points to the larger functionality for monorepos.
When
Where
How
Current Behavior
There isn't support for this specific functionality. There are a few workarounds - one being traversing through each directory with a
package.json
and installing/updating the node modules.Expected Behavior
Running an
npm install
/npm ci
will create/reference a single rootpackage-lock.json
file and populate the node modules for a subdirectories of the mono repo.Similar to yarn workspaces, there would be a way to reference subdirectories to each other also (although, this could be a separate feature).
Example:
Who
References
The text was updated successfully, but these errors were encountered: