gabrieltempass / streamlit-navigation-bar

A component that allows you to place a navigation bar in your Streamlit app.
https://streamlit.io/
MIT License
136 stars 14 forks source link

frontend/dist'. is missing #2

Closed anil2799 closed 7 months ago

anil2799 commented 7 months ago

Checklist

Summary

content "frontend/dist". is missing from repo.

streamlit_navigation_bar/frontend/dist'

Traceback: File "/Users/anilmandalapu/NOVA/EDJ/newfile.py", line 2, in from streamlit_navigation_bar import st_navigation_bar File "/Users/anilmandalapu/NOVA/EDJ/streamlit_navigation_bar/init.py", line 32, in _st_navbar = components.declare_component(

Reproducible Code Example

No response

Steps To Reproduce

No response

Expected Behavior

No response

Current Behavior

No response

Is this a regression?

Debug info

Additional Information

No response

gabrieltempass commented 7 months ago

Hey @anil2799,

It's usually not a good practice to include the dist directory in version control. Because any changes in the frontend code will generate a new dist and pollute the diff.

Do you want to just use the navbar or code it in development mode?

If you want to just use the navbar, which is probably the case, you need to: pip install streamlit-navigation-bar. Then you properly import and call the st_navbar function, like it's shown in the documentation examples.

Your error message shows:

from streamlit_navigation_bar import st_navigation_bar

If you haven't edited the package code, the import statement is wrong. It should be:

from streamlit_navigation_bar import st_navbar

However, if that is not the case and you want to code in development mode, you need to follow the development steps from the contributing guide. Then, after the second step, you can generate the dist folder yourself by running npm run build.