whitphx / streamlit-component-template-react-hooks

Streamlit component lib with React hooks and template project using it
MIT License
55 stars 11 forks source link

Component does not work when building the frontend #90

Closed murilo-cunha closed 1 year ago

murilo-cunha commented 1 year ago

Hi @whitphx, long time no speak 🖖

I really enjoy the react hooks-based approach, but I'm getting an error when I build the frontend and declare the component...

image

I don't think the issue is with the react-hooks template, but also running out of ideas.. For development - that is, when I manually run yarn start on the frontend/ directory and have _RELEASE=False everything works as expected.

After some research, it looks like it's a timeout thing on the Typescript side.

Related links:

whitphx commented 1 year ago

Hi,

It looks like "homepage": "." has been removed in your frontend/package.json. Revert it.

whitphx commented 1 year ago

That specification is used to build the JS and CSS files to be linked through relative paths from the index.html with the CRA setting.

If you want to change or remove the "homepage" field, use the PUBLIC_PATH envvar with the build command.

murilo-cunha commented 1 year ago

That worked like a charm! Thank you so much!! 🙏 🙏 🙏

StreamlitWiz 🧙‍♂️