pngwn / gradio-imageslider

ImageSlider custom component for gradio.
https://huggingface.co/spaces/pngwn/gradio_imageslider
30 stars 5 forks source link

Encountered Type Error When Running $gradio cc dev #32

Open koi953215 opened 3 months ago

koi953215 commented 3 months ago

I am working on developing my own Gradio package using the code from this repository as a template. I have followed these steps:

  1. Cloned the repository.
  2. Navigated to the frontend directory and ran npm install.
  3. Modified app.py to import ImageSlider from the backend directory instead of using the pip install

However, when attempting to test locally using the command "gradio cc dev", I encounter the following error:

Encountered type error
Plugin: vite-plugin-svelte 
File: /home_nfs/koi953215/imageslider/frontend/Index.svelte
      at throwError (/home_nfs/koi953215/imageslider/frontend/node_modules/svelte-preprocess/dist/modules/errors.js:5:11)

      at throwTypescriptError (/home_nfs/koi953215/imageslider/frontend/node_modules/svelte-preprocess/dist/modules/errors.js:9:28)

      at transpileTs (/home_nfs/koi953215/imageslider/frontend/node_modules/svelte-preprocess/dist/transformers/typescript.js:215:47)

      at mixedImportsTranspiler (/home_nfs/koi953215/imageslider/frontend/node_modules/svelte-preprocess/dist/transformers/typescript.js:270:60)

      at transformer (/home_nfs/koi953215/imageslider/frontend/node_modules/svelte-preprocess/dist/transformers/typescript.js:344:11)

      at transform (/home_nfs/koi953215/imageslider/frontend/node_modules/svelte-preprocess/dist/autoProcess.js:46:12)

      at async /home_nfs/koi953215/imageslider/frontend/node_modules/svelte-preprocess/dist/autoProcess.js:117:29

      at async script (/home_nfs/koi953215/imageslider/frontend/node_modules/svelte-preprocess/dist/autoProcess.js:147:33)

      at async process_single_tag (file:///home_nfs/koi953215/imageslider/frontend/node_modules/svelte/src/compiler/preprocess/index.js:285:21)

      at async Promise.all (index 0)

Could you please provide instructions or troubleshooting steps to address this error? Any additional information or guidance on setting up the local development environment correctly would be highly appreciated.

Thank you for your help!