Replies: 1 comment 2 replies
-
What is |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm building my Python/Flask+React/Vite app into a single executable using pyinstaller. I'm having an issue where I'm unable to access my React routes when running the app from the executable (debian). Getting an error in the Flask server when navigating to the site: GET / HTTP/1.1" 404 - (which applies that it's trying to hit that endpoint on the Flask server, and is not respecting the React routes)
This only happens when running the debian package.
The routes work fine when just running the Flask server from source. I had added this to my flask code to get that to work:
`
Is there a flag to add to the pyinstaller build command that's needed to have my React routes work?
Here's my pyinstaller command:
pyinstaller --add-data "static:static" --onefile src/$app.py --name $app-$VERSION --log-level WARN --distpath $BUILD_DIR/$COMPONENTS_DIR/$app/pyinstaller/dist/ --workpath $BUILD_DIR/$COMPONENTS_DIR/$app/pyinstaller/temp/
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions