Forum - Unable to resolve dependency tree

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #69866
    Jim Nicholls
    Participant

    After creating an empty dir and then running «eca init» inside that dir, «eca start» fails with the error «ERESOLVE unable to resolve dependency tree»

    eca: ‘v0.5.0’, node: ‘14.16.0’, npm: ‘7.6.0’, macos: ‘10.15.7’

    npm ERR! code ERESOLVE
    npm ERR! ERESOLVE unable to resolve dependency tree
    npm ERR!
    npm ERR! While resolving: my-exl-cloudapp@1.0.0
    npm ERR! Found: @angular/core@9.1.13
    npm ERR! node_modules/@angular/core
    npm ERR! @angular/core@”^9.1.0″ from the root project
    npm ERR! peer @angular/core@”^9.0.0 || ^10.0.0-0″ from @angular/material@9.2.4
    npm ERR! node_modules/@angular/material
    npm ERR! @angular/material@”^9.2.0″ from the root project
    npm ERR!
    npm ERR! Could not resolve dependency:
    npm ERR! peer @angular/core@”10.2.4″ from @angular/animations@10.2.4
    npm ERR! node_modules/@angular/animations
    npm ERR! peer @angular/animations@”^9.0.0 || ^10.0.0-0″ from @angular/material@9.2.4
    npm ERR! node_modules/@angular/material
    npm ERR! @angular/material@”^9.2.0″ from the root project
    npm ERR!
    npm ERR! Fix the upstream dependency conflict, or retry
    npm ERR! this command with –force, or –legacy-peer-deps
    npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
    npm ERR!
    npm ERR! See /Users/jim/.npm/eresolve-report.txt for a full report.

    #69867
    Jim Nicholls
    Participant

    # npm resolution error report

    2021-02-28T03:32:08.000Z

    While resolving: my-exl-cloudapp@1.0.0
    Found: @angular/core@9.1.13
    node_modules/@angular/core
    @angular/core@”^9.1.0″ from the root project
    peer @angular/core@”^9.0.0 || ^10.0.0-0″ from @angular/material@9.2.4
    node_modules/@angular/material
    @angular/material@”^9.2.0″ from the root project

    Could not resolve dependency:
    peer @angular/core@”10.2.4″ from @angular/animations@10.2.4
    node_modules/@angular/animations
    peer @angular/animations@”^9.0.0 || ^10.0.0-0″ from @angular/material@9.2.4
    node_modules/@angular/material
    @angular/material@”^9.2.0″ 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.

    Raw JSON explanation object:

    {
    “code”: “ERESOLVE”,
    “current”: {
    “name”: “@angular/core”,
    “version”: “9.1.13”,
    “whileInstalling”: {
    “name”: “my-exl-cloudapp”,
    “version”: “1.0.0”,
    “path”: “/Users/jim/Documents/Development/experiments/eca/my-first-cloudapp”
    },
    “location”: “node_modules/@angular/core”,
    “dependents”: [
    {
    “type”: “prod”,
    “name”: “@angular/core”,
    “spec”: “^9.1.0”,
    “from”: {
    “location”: “/Users/jim/Documents/Development/experiments/eca/my-first-cloudapp”
    }
    },
    {
    “type”: “peer”,
    “name”: “@angular/core”,
    “spec”: “^9.0.0 || ^10.0.0-0”,
    “from”: {
    “name”: “@angular/material”,
    “version”: “9.2.4”,
    “whileInstalling”: {
    “name”: “my-exl-cloudapp”,
    “version”: “1.0.0”,
    “path”: “/Users/jim/Documents/Development/experiments/eca/my-first-cloudapp”
    },
    “location”: “node_modules/@angular/material”,
    “dependents”: [
    {
    “type”: “prod”,
    “name”: “@angular/material”,
    “spec”: “^9.2.0”,
    “from”: {
    “location”: “/Users/jim/Documents/Development/experiments/eca/my-first-cloudapp”
    }
    }
    ]
    }
    }
    ]
    },
    “edge”: {
    “type”: “peer”,
    “name”: “@angular/core”,
    “spec”: “10.2.4”,
    “error”: “INVALID”,
    “from”: {
    “name”: “@angular/animations”,
    “version”: “10.2.4”,
    “whileInstalling”: {
    “name”: “my-exl-cloudapp”,
    “version”: “1.0.0”,
    “path”: “/Users/jim/Documents/Development/experiments/eca/my-first-cloudapp”
    },
    “location”: “node_modules/@angular/animations”,
    “dependents”: [
    {
    “type”: “peer”,
    “name”: “@angular/animations”,
    “spec”: “^9.0.0 || ^10.0.0-0”,
    “from”: {
    “name”: “@angular/material”,
    “version”: “9.2.4”,
    “whileInstalling”: {
    “name”: “my-exl-cloudapp”,
    “version”: “1.0.0”,
    “path”: “/Users/jim/Documents/Development/experiments/eca/my-first-cloudapp”
    },
    “location”: “node_modules/@angular/material”,
    “dependents”: [
    {
    “type”: “prod”,
    “name”: “@angular/material”,
    “spec”: “^9.2.0”,
    “from”: {
    “location”: “/Users/jim/Documents/Development/experiments/eca/my-first-cloudapp”
    }
    }
    ]
    }
    }
    ]
    }
    },
    “peerConflict”: null,
    “strictPeerDeps”: false,
    “force”: false
    }

    #69868
    Jim Nicholls
    Participant

    Sorry for the lack of formatting on eresolve-report.txt.

    #69869
    Jim Nicholls
    Participant

    Looks like it’s related to a breaking change npm v7 around conflicting peer dependencies. https://github.blog/2021-02-02-npm-7-is-now-generally-available/

    Running «npm install –legacy-peer-deps» before «eca start» seems to have worked.

    #69870
    Jim Nicholls
    Participant

    The root cause seems to be @exlibris/exl-cloudapp-angular-lib having peer dependencies on exactly specific versions of @angular packages.

    #69875
    Josh Weisman
    Keymaster

    Hi Jim. Thanks a lot for your note and your troubleshooting! We have added documentation around this problem in our Getting Started guide. We’ll work to get support for NPM 7+ in a future version of the CLI.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.