DenizD / Streamlit-Image-Carousel

Image Carousel Component for Streamlit
59 stars 10 forks source link

missing bundle.css #2

Open UrskaJ opened 2 years ago

UrskaJ commented 2 years ago

I am trying to load images that i host on my server and i am getting this error: 2021-12-22 17:48:24.827 ComponentRequestHandler: GET web_demo.image-carousel-component/build/bundle.css read error Traceback (most recent call last): File ".../lib/python3.8/site-packages/streamlit/components/v1/components.py", line 321, in get with open(abspath, "rb") as file: FileNotFoundError: [Errno 2] No such file or directory: '.../frontend/public/build/bundle.css' I've followed the installation instructions and don't recall anything going wrong there.
Any idea what is happening? Alternatively, can you please share the missing file?

UrskaJ commented 2 years ago

Any ideas?

mdogan-ciitizen commented 2 years ago

@DenizDogan92 having the same exact error of missing bundle.css error @UrskaJ experienced, any suggestions ? Also thanks for this swift and nice implementation.

go-bears commented 2 years ago

If you go into rollup.config.js, you'll see the lines that writes out the bundle.css file. If you uncomment the line the error goes away. you'll also need to remove the 'public/build' path reference b/c svelte will write another set of 'public/build' folders within the initial public folder. The file will write to the correct location without the additional path information.

            // enable run-time checks when not in production
            dev: !production,
            // we'll extract any component CSS out into
            // a separate file - better for performance
            css: css => {
                css.write('bundle.css');

            },

            preprocess: sveltePreprocess(),
        }),

this is worked for me @UrskaJ @mdogan-ciitizen , maybe it'll help you.