qwikifiers / qwik-nx

Nx plugin for Qwik
132 stars 24 forks source link

Dependency conflict after generating application in existing Nx repo #106

Closed blove closed 1 year ago

blove commented 1 year ago

Current Behavior

After generating an application in an existing Nx repository, running npm install fails due to dependency conflict:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: qwik-nx@0.13.1
npm ERR! Found: @builder.io/qwik@0.20.1
npm ERR! node_modules/@builder.io/qwik
npm ERR!   peer @builder.io/qwik@">=0.20.0" from @builder.io/qwik-city@0.5.3
npm ERR!   node_modules/@builder.io/qwik-city
npm ERR!     dev @builder.io/qwik-city@"~0.5.0" from the root project
npm ERR!   dev @builder.io/qwik@"~0.20.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @builder.io/qwik@"^0.17.0" from qwik-nx@0.13.1
npm ERR! node_modules/qwik-nx
npm ERR!   dev qwik-nx@"^0.13.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @builder.io/qwik@0.17.5
npm ERR! node_modules/@builder.io/qwik
npm ERR!   peer @builder.io/qwik@"^0.17.0" from qwik-nx@0.13.1
npm ERR!   node_modules/qwik-nx
npm ERR!     dev qwik-nx@"^0.13.1" from the root project

Expected Behavior

After generating a Qwik application using the latest version of the qwik-nx plugin there should not be a peer dependency conflict.

GitHub Repo

No response

Steps to Reproduce

  1. npm i qwik-nx@latest -D
  2. nx generate qwik-nx:app

Nx Report

>  NX   Report complete - copy this into the issue template

   Node : 18.14.0
   OS   : darwin arm64
   npm  : 9.3.1

   nx                      : 15.8.6
   @nrwl/js                : 15.8.6
   @nrwl/jest              : 15.8.6
   @nrwl/linter            : 15.8.6
   @nrwl/workspace         : 15.8.6
   @nrwl/cli               : 15.8.6
   @nrwl/cypress           : 15.8.6
   @nrwl/devkit            : 15.8.6
   @nrwl/esbuild           : 15.8.6
   @nrwl/eslint-plugin-nx  : 15.8.6
   @nrwl/node              : 15.8.6
   @nrwl/react             : 15.8.6
   @nrwl/rollup            : 15.8.6
   @nrwl/tao               : 15.8.6
   @nrwl/vite              : 15.8.6
   @nrwl/web               : 15.8.6
   @nrwl/webpack           : 15.8.6
   @nrwl/nx-cloud          : 15.2.1
   typescript              : 4.9.5
   ---------------------------------------
   Community plugins:
   qwik-nx : 0.13.1

Failure Logs

No response

Additional Information

No response

dmitry-stepanenko commented 1 year ago

This is probably a known issue with npm >= 8.6 https://github.com/npm/cli/issues/3666.

blove commented 1 year ago

Thanks for the quick reply. I wasn't aware of this known issue.

dmitry-stepanenko commented 1 year ago

@blove I've excluded qwik from package's peer dependencies in qwik-nx@0.13.2, this should resolve the problem for you

blove commented 1 year ago

Thanks!