I had the same error. I was able to fix it (after a lot of effort) by minimizing the differences in the package.json dependencies when compared to the original streamlit-component-template. I suggest to copy the dependencies from Streamlit’s package.json to your own project to start.