question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERESOLVE unable to resolve dependency tree

See original GitHub issue

Describe the bug Unable to resolve dependency tree Fresh installation of everything.

To Reproduce Steps to reproduce the behavior:

  1. npm install @ionic/angular@6 @ionic/angular-server@6
  2. ionic start test blank --type angular
  3. cd test
  4. npm install @capacitor-community/barcode-scanner
  5. See error

Expected behavior install successfully like most updated plugins.

Screenshots Screen Shot 2022-08-08 at 8 30 35 AM

Version [v2.1.1]

Desktop (please complete the following information):

  • OS: MacOS Monterey 12.5
  • Browser [Firefox]
  • Version [103.0.1]

Additional context `# npm resolution error report

2022-08-08T04:15:15.223Z

While resolving: ang@0.0.1 Found: @capacitor/core@4.0.1 node_modules/@capacitor/core @capacitor/core@“4.0.1” from the root project

Could not resolve dependency: peer @capacitor/core@“^3.0.0” from @capacitor-community/barcode-scanner@2.1.1 node_modules/@capacitor-community/barcode-scanner @capacitor-community/barcode-scanner@“*” 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”: “@capacitor/core”, “version”: “4.0.1”, “whileInstalling”: { “name”: “ang”, “version”: “0.0.1”, “path”: “Desktop/Test” }, “location”: “node_modules/@capacitor/core”, “isWorkspace”: false, “dependents”: [ { “type”: “prod”, “name”: “@capacitor/core”, “spec”: “4.0.1”, “from”: { “location”: “Desktop/Test” } } ] }, “currentEdge”: { “type”: “prod”, “name”: “@capacitor/core”, “spec”: “4.0.1”, “from”: { “location”: “Desktop/Test” } }, “edge”: { “type”: “peer”, “name”: “@capacitor/core”, “spec”: “^3.0.0”, “error”: “INVALID”, “from”: { “name”: “@capacitor-community/barcode-scanner”, “version”: “2.1.1”, “whileInstalling”: { “name”: “ang”, “version”: “0.0.1”, “path”: “Desktop/Test” }, “location”: “node_modules/@capacitor-community/barcode-scanner”, “isWorkspace”: false, “dependents”: [ { “type”: “prod”, “name”: “@capacitor-community/barcode-scanner”, “spec”: “*”, “from”: { “location”: “Desktop/Test” } } ] } }, “strictPeerDeps”: false, “force”: false } `

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
thegnuucommented, Aug 10, 2022

I just released v3, thanks to everyone that helped on this issue!

1reaction
hauserkristofcommented, Aug 9, 2022

@ssj7 try to install the capacitor 4 branch version with

npm install --save https://github.com/capacitor-community/barcode-scanner/tree/capacitor-v4

It is working until they do not merge the changes.

Also, it worths a look on the PR #142 the self keyword is missing from the code yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to resolve dependency tree error when installing npm ...
First to understand the problem. Here is what I have as error: npm ERR! ERESOLVE unable to ...
Read more >
Unable to resolve dependency tree error in Angular while ...
To fix Unable to resolve dependency tree error in Angular while installing `npm` packages follow the below steps. 1.
Read more >
ERESOLVE unable to resolve dependency tree when npm ...
ERESOLVE unable to resolve dependency tree when npm install runs in nodejs and netlify · This error occurs with any application type like...
Read more >
How to Fix npm ERR ERESOLVE Unable to Resolve ...
Command:- npm config set legacy-peer-deps trueIn This Video We Will See How to Fix npm ERR ERESOLVE Unable to Resolve Dependency Tree ......
Read more >
(Solved) ERESOLVE unable to resolve dependency tree while ...
1. Remove node_modules and package-lock.json and then run · 2. Or try clearing out npm cache · 3. Or run command with –legacy-peer-deps...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found