Skip to content

NPM Workspace dependency resolution differing in production builds #86641

Discussion options

You must be logged in to vote

The dependencies specified in the root package.json take precedence over the app-level dependencies. This behavior ensures consistency across the entire monorepo and avoids duplication of dependencies.

In your case, it seems that the older version of the dependency is specified in the root package.json, causing it to be used in production builds. To resolve this issue, you can try the following steps:

-Update the dependency version in the root package.json to the desired newer version that works correctly for your appA.

-Fine-tune Dependency Versions: If you have different packages in your monorepo depending on different versions of the same dependency, you can explore techniques to fine-…

Replies: 1 comment 5 replies

This comment was marked as off-topic.

@someguynamedmatt
Comment options

@kooya3

This comment was marked as off-topic.

@kooya3

This comment was marked as off-topic.

@someguynamedmatt
Comment options

@kooya3

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Programming Help Programming languages, open source, and software development.
2 participants