tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

Hand-pose-detection demos are failing to build/run

Open mikkamikka opened this issue 3 years ago • 6 comments

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
  • TensorFlow.js installed from (npm or script link): https://github.com/tensorflow/tfjs-models/tree/master/hand-pose-detection/demos
  • TensorFlow.js version: 3.9.0

Describe the problem

Any attempt running hand-pose detection demos locally failed. I followed the instructions listed here https://github.com/tensorflow/tfjs-models/tree/master/hand-pose-detection/demos#how-to-run-a-demo

Step 2 ("Remove cache etc. rm -rf .cache dist node_modules") throws an error:

Remove-Item : A parameter cannot be found that matches parameter name 'rf'.

Step 3 ("Build dependency. yarn build-dep") throws a bunch of 27 errors, typical one of:

src/mediapipe/mediapipe_test.ts:25:65 - error TS2307: Cannot find module '../shared/test_util' or its corresponding type declarations.

etc.

Any suggestion for the correct demos build and run sequence?

Thanks!

mikkamikka avatar Dec 29 '22 19:12 mikkamikka

Step 2 ("Remove cache etc. rm -rf .cache dist node_modules") throws an error:

Remove-Item : A parameter cannot be found that matches parameter name 'rf'.

It looks like you are following the steps on your Windows machine. Actually, the instructions work on Mac or Linux machines, so you have to find out the corresponding commands for windows to run it.

For step2, you could manually delete .cache dist node_modules files or folders, if exists. For step3, running yarn build-dep is same as running the following three commands:

cd ../../ 
yarn 
yarn build

If any of the commands does not work, you have to find corresponding commands for Windows.

Linchenn avatar Dec 29 '22 22:12 Linchenn

@Linchenn Thank you for your suggestions. I'm on a Windows machine, and I had no idea those commands are for Mac/Linux evironment.

mikkamikka avatar Jan 02 '23 15:01 mikkamikka

Hi, @mikkamikka

Apologize for the delayed response and please refer above comment from @Linchenn and if you're looking to clear cache and node modules folder on Windows system then I would suggest you to please follow below steps :

  1. Install below NPM package

npm install rimraf -g

  1. delete the node_modules folder easily with

rimraf node_modules

For clearing the cache you can use npm-cache package also, you can refer this official documentation

If have I missed something here, please let me know ? If issue still persists please let us know or Could you please confirm if this issue is resolved for you ? Please feel free to close the issue if it is resolved ? Thank you!

gaikwadrahul8 avatar Apr 21 '23 11:04 gaikwadrahul8

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.

google-ml-butler[bot] avatar Apr 29 '23 07:04 google-ml-butler[bot]

Closing as stale. Please @mention us if this needs more attention.

google-ml-butler[bot] avatar May 06 '23 07:05 google-ml-butler[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar May 06 '23 07:05 google-ml-butler[bot]