Reputation: 1
I'm trying to deploy a Flask app using Vercel and I'm getting an error during the build that reads as follows:
[Error: ENOENT: no such file or directory, lstat '/vercel/path0/werkzeug/__pycache__/_compat.cpython-39.pyc'] {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/vercel/path0/werkzeug/__pycache__/_compat.cpython-39.pyc'
}
The full console log is below.
Running build in Washington, D.C., USA (East) – iad1
Cloning github.com/AjayaRamachandran/PowerScore (Branch: main, Commit: 383d0a9)
Cloning completed: 2.337s
Restored build cache
Running "vercel build"
Vercel CLI 34.3.0
Installing required dependencies...
Installing required dependencies...
Installing required dependencies...
Installing required dependencies...
Installing required dependencies...
Build Completed in /vercel/output [1m]
[Error: ENOENT: no such file or directory, lstat '/vercel/path0/werkzeug/__pycache__/_compat.cpython-39.pyc'] {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/vercel/path0/werkzeug/__pycache__/_compat.cpython-39.pyc'
}
My file structure looks like this:
root
- api
- static
- app.py
- templates
- index.html
- ...
- requirements.txt
- vercel.json
- ...
- Pipfile
- Pipfile.lock
Sidenote: the pipfile
and pipfile.lock
are outside of the api
folder because when they were inside the builder was skipping a lot of installations and although the build would finish the final domain would just have error 404
on it. After removing those from the api
folder it seems to not skip any installations, but it causes the Werkzeug
conflict that is bugging me. Any help would be appreciated. Thank you!
Upvotes: -1
Views: 107
Reputation: 1
This question has been resolved. My file structure was incorrect.
My initial file structure looked like this:
root
- api
- static
- app.py
- templates
- index.html
- ...
- requirements.txt
- vercel.json
- ...
- Pipfile
- Pipfile.lock
It was supposed to look like this:
root
- api
- app.py
- ...
- templates
- index.html
- ...
- requirements.txt
- vercel.json
- venv
- ...
Upvotes: 0