teachablemachine-community icon indicating copy to clipboard operation
teachablemachine-community copied to clipboard

[BUG]: @tensorflow/tfjs Dependency error due to version mismatch

Open abhik-wil opened this issue 2 years ago • 4 comments

Describe the bug I am trying to use @tensorflow/tfjs and @teachablemachine/pose with a simple Vite app. While tfjs installs fine with npm i, I am getting the following dependency tree error on the latter:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @tensorflow/[email protected]
npm ERR! node_modules/@tensorflow/tfjs
npm ERR!   @tensorflow/tfjs@"^4.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @tensorflow/tfjs@"1.3.1" from @teachablemachine/[email protected]
npm ERR! node_modules/@teachablemachine/pose
npm ERR!   @teachablemachine/pose@"*" 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.

PS: I am not sure where to raise the issue. Since I am following this Repo, I raised it here. Please redirect me to the correct repo if this is not the correct place.

To Reproduce

  1. Run npm create vite@latest.
  2. Go to the project folder and run npm i.
  3. Then run the following:
npm i @tensorflow/tfjs
npm i @teachablemachine/pose

Expected behavior The modules should install perfectly.

Additional context teachablemachine/pose install when using --force with npm i.

abhik-wil avatar Feb 12 '23 18:02 abhik-wil

Similar issue.

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @teachablemachine/[email protected] npm ERR! Found: @tensorflow/[email protected] npm ERR! node_modules/@tensorflow/tfjs npm ERR! dev @tensorflow/tfjs@"^4.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @tensorflow/tfjs@"1.3.1" from @teachablemachine/[email protected] npm ERR! node_modules/@teachablemachine/image npm ERR! dev @teachablemachine/image@"^0.8.5" from the root project npm ERR! npm ERR! Conflicting peer dependency: @tensorflow/[email protected] npm ERR! node_modules/@tensorflow/tfjs npm ERR! peer @tensorflow/tfjs@"1.3.1" from @teachablemachine/[email protected] npm ERR! node_modules/@teachablemachine/image npm ERR! dev @teachablemachine/image@"^0.8.5" 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.

de24world avatar Feb 23 '23 22:02 de24world

me too

MorningStarHu avatar Sep 25 '23 08:09 MorningStarHu

me three

lionstigersandbears avatar Nov 16 '23 11:11 lionstigersandbears

me four :D

hamidrezafarzin avatar Jun 10 '24 16:06 hamidrezafarzin