andfanilo / streamlit-drawable-canvas

Do you like Quick, Draw? Well what if you could train/predict doodles drawn inside Streamlit? Also draws lines, circles and boxes over background images for annotation.
https://drawable-canvas.streamlit.app/
MIT License
541 stars 83 forks source link

Your app is having trouble loading the streamlit_drawable_canvas.st_canvas component. #101

Open emptytank opened 1 year ago

emptytank commented 1 year ago

I had to make some modifications to package.json to be able to compile properly including:

However, when i run the streamlit app.py, i get the following error message when trying to load the canvas:

Your app is having trouble loading the streamlit_drawable_canvas.st_canvas component.

(The app is attempting to load the component from ****, and hasn't received its "streamlit " message.)

If this is a development build, have you started the dev server? If this is a release build, have you compiled the frontend? For more troubleshooting help, please see the Streamlit Component docs or visit our forums.

I've also set the _RELEASE = True in the init.py file, and ran npm build in the "frontend" folder.

I also get the below warnings for npm run start:

(webpack)/buildin/global.js There are multiple modules with names that only differ in casing. This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Use equal casing. Compare these module identifiers:

  • C:\Users\username\GitHub\streamlit-drawable-canvas\streamlit_drawable_canvas\frontend\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!C:\Users\username\GitHub\streamlit-drawable-canvas\streamlit_drawable_canvas\frontend\node_modules\webpack\buildin\global.js Used by 22 module(s), i. e. C:\Users\username\GitHub\streamlit-drawable-canvas\streamlit_drawable_canvas\frontend\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!C:\Users\username\GitHub\streamlit-drawable-canvas\streamlit_drawable_canvas\frontend\node_modules\node-libs-browser\node_modules\punycode\punycode.js
  • C:\Users\username\GitHub\streamlit-drawable-canvas\streamlit_drawable_canvas\frontend\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!C:\Users\username\Github\streamlit-drawable-canvas\streamlit_drawable_canvas\frontend\node_modules\webpack\buildin\global.js Used by 2 module(s), i. e. C:\Users\username\GitHub\streamlit-drawable-canvas\streamlit_drawable_canvas\frontend\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!C:\Users\username\Github\streamlit-drawable-canvas\streamlit_drawable_canvas\frontend\node_modules\lodash\lodash.js

Any thoughts on how to resolve?

--

Versions: node = 18.13.0 npm = 8.19.3 python = 3.11.1

andfanilo commented 1 year ago

Hey! Sorry for the late reply, lots of things going on for me :) Anyway, I was wondering