-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nextjs-flask example broken #816
Comments
I've found that I am able to get this working by running the |
I managed to resolve this by updating the versions of numpy and Flask in the requirements.txt:
Before I tried that, I also installed pnpm, but not sure if that's required if you just update the versions above.
|
anyone can solve this ? |
i have solve this with remove FLASK_DEBUG=1 |
Hey guys, I could run it but I had to install and update lot of things (I've been asking copilot pasting the errors of the console and he guided me) My python version: My requirements.txt: My command to run: I'm using Windows and I also had to install choco & cmake And lastly run this commands to create an environment |
Just need to install pnpm:
But first, be sure you have done: FIrst Install a virtual environment and python dependencies (be sure to have Flask and numpy to last versions modifiying requirements.txt): Finally, just |
What about production ? Someone already deploy this on Vercel without any issue ? (Edit) Find that it's broken in this #831, i test it myself and still the case. |
I managed to get it working in production by modifying the "start" command in package.json to: "start": "concurrently "next start" "PYTHONPATH=./api:$PYTHONPATH api/venv/bin/gunicorn -w 4 -b :5328 api.index:app"" Additionally, it was necessary to update next.config.js to ensure it continues to accept requests in the production environment. Therefore, I modified the line from /api/ to 'http://127.0.0.1:5328/api/:path*'. |
@nacx-cg actually the issue when i'm building the project. |
@YvesleCurseur This is solved by adjusting node version to 18.x in the vercel Project Settings |
Thank's @nacx-cg ! Yeah i kept the 20.x one, just switched and it's working fine now. |
I'm also facing the same issue while running a project on Windows. I resolved it by setting FLASK_DEBUG=1 in the terminal and removing it from the flask-dev command.
For more info, you can check this Stack Overflow post. |
Running:
npx create-next-app nextjs-flask --example "https://github.com/vercel/examples/tree/main/python/nextjs-flask"
cd nextjs-flask
npm install
npm run dev
results in:
I've also tried this another time after
--force
fixing the vulnerabilities.:(
The text was updated successfully, but these errors were encountered: