0

ionic start my-app tabs --capacitor

Pick a framework!

Please select the JavaScript framework to use for your new app. To bypass this prompt next time, supply a value for the --type option.

? Framework: React √ Preparing directory .\my-app in 2.24ms √ Downloading and extracting tabs starter in 325.63ms

ionic integrations enable capacitor --quiet -- my-app io.ionic.starter npm.cmd i --save -E @capacitor/core npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: ionic-app-base@0.1.0 npm ERR! Found: typescript@4.1.3 npm ERR! node_modules/typescript npm ERR! typescript@"4.1.3" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peerOptional typescript@"^3.2.1" from react-scripts@4.0.1 npm ERR! node_modules/react-scripts npm ERR! react-scripts@"4.0.1" 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 C:\Users\sowmyans\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\sowmyans\AppData\Local\npm-cache_logs\2021-02-03T21_23_15_246Z-debug.log [ERROR] An error occurred while running subprocess npm.

    npm.cmd i --save -E @capacitor/core exited with exit code 1.

npm resolution error report

2021-02-03T20:47:47.168Z

Found: typescript@4.1.3 node_modules/typescript typescript@"4.1.3" from the root project

Could not resolve dependency: peerOptional typescript@"^3.2.1" from react-scripts@4.0.1 node_modules/react-scripts react-scripts@"4.0.1" 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": "typescript", "version": "4.1.3", "location": "node_modules/typescript", "dependents": [ { "type": "prod", "name": "typescript", "spec": "4.1.3", "from": { "location": "C:\Users\[user]\\source\repos\ionic\my-app" } } ] }, "edge": { "type": "peerOptional", "name": "typescript", "spec": "^3.2.1", "error": "INVALID", "from": { "name": "react-scripts", "version": "4.0.1", "location": "node_modules/react-scripts", "dependents": [ { "type": "prod", "name": "react-scripts", "spec": "4.0.1", "from": { "location": "C:\Users\[user]\source\repos\ionic\my-app } } ] } }, "peerConflict": null, "strictPeerDeps": false, "force": false }

Sowmyan Soman
  • 853
  • 1
  • 9
  • 21

1 Answers1

0

I have faced the same problem in the past. I could only resolve it by manually deleting the dependencies that he was about one by one from the global node_modules folder. Whenever, I would delete one package, it would tell me there is a conflict in another package as well which I kept on deleting and at the end I got the application up and running.

Raef Kandil
  • 307
  • 1
  • 12