koliveira15 / nx-sonarqube

A Nx plugin that scans projects using SonarQube / SonarCloud.
MIT License
51 stars 21 forks source link

Support Nx 17 #57

Closed diegohoyos closed 1 year ago

diegohoyos commented 1 year ago

When upgrade to Nx 17, npm is not able to resolve peer dependencies properly

Could not resolve dependency: peer @nx/devkit@"16.7.4" from @koliveira15/nx-sonarqube@3.2.0 node_modules/@koliveira15/nx-sonarqube dev @koliveira15/nx-sonarqube@"3.2.0" from the root project

Conflicting peer dependency: @nx/devkit@16.7.4 node_modules/@nx/devkit peer @nx/devkit@"16.7.4" from @koliveira15/nx-sonarqube@3.2.0 node_modules/@koliveira15/nx-sonarqube dev @koliveira15/nx-sonarqube@"3.2.0" from the root project

diegohoyos commented 1 year ago

Update seems to work partially.

New peer dependecies are static versions

image

I suggest to specify range or minimun versions for peer dependencies, same way as @nx/devkit does.

"nx": ">= 16 <= 18" "tslib": "^2.3.0",

image

With version 3.3.0 I have now conflic with tslib library as I have a newer version in my project

npm ERR! Found: tslib@2.6.2 npm ERR! node_modules/tslib npm ERR! tslib@"2.6.2" from the root project npm ERR! tslib@"^2.3.0" from @nx/devkit@17.1.2 npm ERR! node_modules/@nx/devkit npm ERR! dev @nx/devkit@"17.1.2" from the root project npm ERR! peer @nx/devkit@"17.1.2" from @koliveira15/nx-sonarqube@3.3.0 npm ERR! node_modules/@koliveira15/nx-sonarqube npm ERR! dev @koliveira15/nx-sonarqube@"3.3.0" from the root project npm ERR! 3 more (nx, @swc-node/register, @swc/helpers) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer tslib@"2.3.0" from @koliveira15/nx-sonarqube@3.3.0 npm ERR! node_modules/@koliveira15/nx-sonarqube npm ERR! dev @koliveira15/nx-sonarqube@"3.3.0" from the root project

koliveira15 commented 1 year ago

@diegohoyos can you try 3.3.1?

diegohoyos commented 1 year ago

@koliveira15 it is working fine now, no dependency conflict. Thanks.