Hello all, I’m currently working on deploying an application using a custom component we’ve written to allow us to log in users w/Auth0. The application works well locally but when we deploy to stage or production the component seems to 404, resulting in this error:
After the page has been refreshed a few times (across all pods) the application works well, but of course this isn’t great from a user experience perspective.
Here’s the code we’re using to load the component:
parent_dir = os.path.dirname(os.path.abspath(__file__))
build_dir = os.path.join(parent_dir, "frontend/build")
logger.info(
"Login Button Component Directory",
build_dir=build_dir,
parent_dir=parent_dir
)
button = components.declare_component("login_button", path=build_dir)
I’ve confirmed that the build_dir is correct inside the pod itself.
Any help would be greatly appreciated!
Best,
Justin