How can I solve dependency errors trying to install FileSaver.js

Discussão em 'Angular' iniciado por parascus, Janeiro 24, 2025.

  1. parascus

    parascus Guest

    I try to install FileSaver.js but it's giving me some trouble. I am using the following call:

    npm i file-saver


    But I don't get a success:

    npm error code ERESOLVE
    npm error ERESOLVE could not resolve
    npm error
    npm error While resolving: @angular-devkit/build-angular@18.2.11
    npm error Found: @angular/localize@19.0.6
    npm error node_modules/@angular/localize
    npm error peer @angular/localize@"^19.0.0" from @ng-bootstrap/ng-bootstrap@18.0.0
    npm error node_modules/@ng-bootstrap/ng-bootstrap
    npm error
    npm error Could not resolve dependency:
    npm error peerOptional @angular/localize@"^18.0.0" from @angular-devkit/build-angular@18.2.11
    npm error node_modules/@angular-devkit/build-angular
    npm error dev @angular-devkit/build-angular@"^18.2.7" from the root project
    npm error
    npm error Conflicting peer dependency: @angular/compiler@18.2.13
    npm error node_modules/@angular/compiler
    npm error peer @angular/compiler@"18.2.13" from @angular/localize@18.2.13
    npm error node_modules/@angular/localize
    npm error peerOptional @angular/localize@"^18.0.0" from @angular-devkit/build-angular@18.2.11
    npm error node_modules/@angular-devkit/build-angular
    npm error dev @angular-devkit/build-angular@"^18.2.7" 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


    As I understand it (what is not very much) there are three problems:

    1. It found @angular/localize@19.0.6 which it doesn't like.
    2. It can't find @angular/localize@"^18.0.0 which it tries to get from @angular-devkit/build-angular@18.2.11
    3. It has a dependency conflict, maybe caused by the errors above.

    I don't have a clue, what to do now and hope, somebody can help me.

    Best regards

    Parascus

    Continue reading...

Compartilhe esta Página