teachablemachine-community
teachablemachine-community copied to clipboard
[BUG]: @tensorflow/tfjs Dependency error due to version mismatch
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
- Run
npm create vite@latest
. - Go to the project folder and run
npm i
. - 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
.
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.
me too
me three
me four :D