nxext / nx-extensions-ionic

Nx Extension for Ionic
MIT License
35 stars 9 forks source link

React: "ERESOLVE unable to resolve dependency tree" error on fresh install #34

Open invot opened 4 months ago

invot commented 4 months ago

I keep running into issues while trying to create a new nxext project where I have to run --force to get @nxext to install, resulting in conflicting or missing dependencies.

While creating a new repo I do the following:

npx create-nx-workspace@18.3.1 (I've also tried @latest and v17 with the same result)

These are the options I select:

✔ Where would you like to create your workspace? · ta-ionic
✔ Which stack do you want to use? · react
✔ What framework would you like to use? · none
✔ Integrated monorepo, or standalone project? · integrated
✔ Application name · ta-ionic
✔ Which bundler would you like to use? · vite
✔ Test runner to use for end to end (E2E) tests · none
✔ Default stylesheet format · scss
✔ Set up CI with caching, distribution and test deflaking · skip
✔ Would you like remote caching to make your build faster? · skip

Things go wrong when I run npm install --save-dev --exact @nxext/ionic-react @nxext/capacitor @nx/react --force

Here's the full list of errors that appears:

npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @nxext/capacitor@18.0.4
npm WARN Found: @nx/web@18.3.1
npm WARN node_modules/@nx/web
npm WARN   @nx/web@"18.3.1" from @nrwl/web@18.3.1
npm WARN   node_modules/@nrwl/web
npm WARN     @nrwl/web@"18.3.1" from @nx/web@18.3.1
npm WARN   2 more (the root project, @nx/react)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @nx/web@"18.2.4" from @nxext/capacitor@18.0.4
npm WARN node_modules/@nxext/capacitor
npm WARN   dev @nxext/capacitor@"*" from the root project
npm WARN   1 more (@nxext/ionic-react)
npm WARN 
npm WARN Conflicting peer dependency: @nx/web@18.2.4
npm WARN node_modules/@nx/web
npm WARN   peer @nx/web@"18.2.4" from @nxext/capacitor@18.0.4
npm WARN   node_modules/@nxext/capacitor
npm WARN     dev @nxext/capacitor@"*" from the root project
npm WARN     1 more (@nxext/ionic-react)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @nxext/ionic-react@18.0.4
npm WARN Found: @nx/eslint@18.3.1
npm WARN node_modules/@nx/eslint
npm WARN   @nx/eslint@"18.3.1" from @nx/linter@18.3.1
npm WARN   node_modules/@nx/linter
npm WARN     @nx/linter@"18.3.1" from @nx/eslint@18.3.1
npm WARN   2 more (the root project, @nx/react)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @nx/eslint@"18.2.4" from @nxext/ionic-react@18.0.4
npm WARN node_modules/@nxext/ionic-react
npm WARN   dev @nxext/ionic-react@"*" from the root project
npm WARN 
npm WARN Conflicting peer dependency: @nx/eslint@18.2.4
npm WARN node_modules/@nx/eslint
npm WARN   peer @nx/eslint@"18.2.4" from @nxext/ionic-react@18.0.4
npm WARN   node_modules/@nxext/ionic-react
npm WARN     dev @nxext/ionic-react@"*" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @nxext/ionic-react@18.0.4
npm WARN Found: @nx/react@18.3.1
npm WARN node_modules/@nx/react
npm WARN   dev @nx/react@"18.3.1" from the root project
npm WARN   1 more (@nrwl/react)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @nx/react@"18.2.4" from @nxext/ionic-react@18.0.4
npm WARN node_modules/@nxext/ionic-react
npm WARN   dev @nxext/ionic-react@"*" from the root project
npm WARN 
npm WARN Conflicting peer dependency: @nx/react@18.2.4
npm WARN node_modules/@nx/react
npm WARN   peer @nx/react@"18.2.4" from @nxext/ionic-react@18.0.4
npm WARN   node_modules/@nxext/ionic-react
npm WARN     dev @nxext/ionic-react@"*" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @swc-node/core@1.13.1
npm WARN Found: @swc/core@1.3.107
npm WARN node_modules/@swc/core
npm WARN   peer @swc/core@">= 1.3" from @swc-node/register@1.8.0
npm WARN   node_modules/@swc-node/register
npm WARN     peerOptional @swc-node/register@"^1.8.0" from nx@18.3.1
npm WARN     node_modules/nx
npm WARN     2 more (the root project, nx)
npm WARN   5 more (@swc/cli, nx, ts-node, the root project, nx)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @swc/core@">= 1.4.13" from @swc-node/core@1.13.1
npm WARN node_modules/@swc-node/core
npm WARN   @swc-node/core@"^1.12.0" from @swc-node/register@1.8.0
npm WARN   node_modules/@swc-node/register
npm WARN 
npm WARN Conflicting peer dependency: @swc/core@1.5.24
npm WARN node_modules/@swc/core
npm WARN   peer @swc/core@">= 1.4.13" from @swc-node/core@1.13.1
npm WARN   node_modules/@swc-node/core
npm WARN     @swc-node/core@"^1.12.0" from @swc-node/register@1.8.0
npm WARN     node_modules/@swc-node/register

I would imagine this should complete successfully, but maybe I am setting up the NX workspace wrong? I'm unsure. I'd love some help with this.

invot commented 4 months ago

Another, possibly unrelated, question I have is if there is an example boilerplate project somewhere on github. I feel like that would help a ton.