bennymeg / nx-electron

Electron schematics for nrwl nx platform
Apache License 2.0
331 stars 85 forks source link

npm i error after upgrading to nx 19 #304

Closed victorcarvalhosp closed 1 month ago

victorcarvalhosp commented 1 month ago

Describe the bug We have an application running with nx18 and nx-electron: 18.0.1 - and everything works fine with nx 18, the problem is as soon as we upgrade to nx19 and then try to run npm i the command fails with this error:

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: nx-electron@18.0.1
npm error Found: @nx/workspace@19.5.8
npm error node_modules/@nx/workspace
npm error   dev @nx/workspace@"19.5.8" from the root project
npm error   @nx/workspace@"19.5.8" from @nrwl/workspace@19.5.8
npm error   node_modules/@nrwl/workspace
npm error     @nrwl/workspace@"19.5.8" from @nx/workspace@19.5.8
npm error   2 more (@nx/js, @nx/next)
npm error
npm error Could not resolve dependency:
npm error peer @nx/workspace@"^18" from nx-electron@18.0.1
npm error node_modules/nx-electron
npm error   dev nx-electron@"^18.0.1" from the root project
npm error
npm error Conflicting peer dependency: @nx/workspace@18.3.5
npm error node_modules/@nx/workspace
npm error   peer @nx/workspace@"^18" from nx-electron@18.0.1
npm error   node_modules/nx-electron
npm error     dev nx-electron@"^18.0.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error

To Reproduce Steps to reproduce the behavior:

  1. Implement a basic example using nx-electron and nx18
  2. Now upgrade nx18 to nx19
  3. Try to run npm i
  4. See error

Expected behavior npm ishould work on nx19

Desktop (please complete the following information):

bennymeg commented 1 month ago

Version mismatch