Replies: 5 comments 1 reply
-
Hi! This is also something I don't understand. In docs for dependency-management it is stated that there are two ways of maintaining deps:
The recommendation is to use Single Version Policy, which is also again stated in multiple issues: (#3023 or #1777) But when I create a buildable lib, a I also found this (which is somehow related):
My main questions are:
The thread is now open for nearly two month. Can someone from the core team please enlighten us? Thank you! |
Beta Was this translation helpful? Give feedback.
-
Having the same issue here - any updates? |
Beta Was this translation helpful? Give feedback.
-
I have the same issue as well, I don't want to put every packages I use in libs into their respectives |
Beta Was this translation helpful? Give feedback.
-
if this could be looked at that'd be awesome. creating workspace plugins? they come prebaked with their own package.json. @nx/remix apps? come with their own package.json. whats the point of an integrated monorepo if you cant keep it....integrated? |
Beta Was this translation helpful? Give feedback.
-
Does this help? (check the overrides property) {
files: ['package.json'], // Only for these files
rules: {
'@nx/dependency-checks': 'off', // Disable it for root-level JSON files
},
}, |
Beta Was this translation helpful? Give feedback.
-
Current Behavior
I upgraded my nx version to 16.7.4 and created a few libraries which throw an error for missing dependencies due to the @nx-dependency-check.
Description
I have a monorepo setup with a single package.json on the workspace level. All older libraries/apps do not have a package.json and refer to the common one in the root of the package.
I created new libraries using @nx/js:library plugin and selected tsc as the bundler. As a new feature, it defaults to creating a package.json per library if it is buildable. Link to documentation on this.
The lint target to these libraries fail since it checks the library's package.json for dependencies.
How can I tell nx that the package.json is maintained on the workspace level while creating the libs or skip on generating the package.json at all in the new nx version?
Beta Was this translation helpful? Give feedback.
All reactions