Could not resolve dependency

Cristian3 months ago

I have the following problem
I downloaded Traccar 6.3 from https://github.com/traccar/traccar/tree/v6.3
but when I try to compile the web application as indicated here https://www.traccar.org/build-web-app/ I get many dependency errors as follows

Could not resolve dependency:
peer react@"^17.0.0" from @mui/styles@5.16.5
node_modules/@mui/styles
  @mui/styles@"^5.16.5" from the root project
  peer @mui/styles@"^5.0.1" from react-mui-dropzone@4.0.7
  node_modules/react-mui-dropzone
    react-mui-dropzone@"^4.0.7" from the root project

Conflicting peer dependency: react@17.0.2
node_modules/react
  peer react@"^17.0.0" from @mui/styles@5.16.5
  node_modules/@mui/styles
    @mui/styles@"^5.16.5" from the root project
    peer @mui/styles@"^5.0.1" from react-mui-dropzone@4.0.7
    node_modules/react-mui-dropzone
      react-mui-dropzone@"^4.0.7" from the root project

Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

Until version 6.2 I have always managed to get it to work.

I also noticed that version 6.3 uses JAVA 17, is this a change from version 6.2 which used JAVA 15?

Anton Tananaev3 months ago

Try a clean run maybe? Or do a force.

Web app has nothing to do with Java.

Cristian3 months ago

I noticed that the change to Java 17 is reported here https://www.traccar.org/blog/traccar-6-3/
But does this change affect the dependencies of the web application?

Anton Tananaev3 months ago

Please read my comment carefully.

Cristian3 months ago

I read it Anton, it's just that we write at the same time.

I will test using the following commands:
npm cache clean -force
npm install --force

Cristian3 months ago

I manage to run but it throws this error when I go to User Preferences

Captura de pantalla 2024-08-03 a la(s) 1.52.46 a. m..png

Anton Tananaev3 months ago

Are you sure it's not related to something you've changed?

Cristian3 months ago

I deleted everything and installed from scratch and it worked.

I only got these warnings

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm warn deprecated react-image-lightbox@5.1.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated @material-ui/system@3.0.0-alpha.2: You can now upgrade to @mui/system. See the guide: https://mui.com/guides/migration-v4/
npm warn deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm warn deprecated material-ui-pickers@2.2.4: You can now upgrade to @material-ui/pickers. Documentation for v2 can be found at https://material-ui-pickers-v2.dmtr-kovalenko.now.sh/
npm warn deprecated core-js@1.2.7: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm warn deprecated @material-ui/core@3.9.3: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.