Hello, I’ve been using monorepos for most of my new projects and it works like a charm, from time to time I need to use keywords like “nohoist” for some lib compatibility and all works fine.
Currently I’m refactoring a big project into a monorepo, for easier testing and maintenance i.e. moving all in-repo-addons to @addons directory and such, the only problem I can’t get over is that this project use a version of ajv: ^8.0.1 (another json validator) that is incompatible with the range of eslint and babel-loader subdependency schema-utils or eslint directly, they both use ajv “^6.12.5”
For example:
When I do yarn, the root node_modules get a copy of ajv ~6, and this app gets its own copy of ajv at ~8 in its own node_modules, which is actually fine and expected but when I build the app, the final version that ember resolves is the ~6 or something like that (I read here that ember-cli clobbers all versions: How should we resolve conflicting addons and dependencies? - #7 by rwjblue), so the code breaks. I tried using the resolutions in the top package.json like this
“resolutions”: { “ajv”: “^8.0.1” }
But it broke the build, it seems webpack, eslint and such actually really depend on version ~6. I’m right now out of options, with a classic repository it was working, I guess because the ~6 version was globally installed or something via dependencies of ember-cli and that is how the ~6 was used to build (ember-cli) and the ~8 was used for the actual app build, but in monorepo somehow it works differently.
I would appreciate any hints or so, thanks for your time.
1 post - 1 participant