Close SQLite connection in Next.js API routes for `next build` command to work?
So I got
my file is:
how do i solve this?
there is a
what would you do?
i believe this should work & it does locally at least but not with docker.
the problem is it sometimes builds perfectly & randomly fails when i delete previously build. so its hard to debug.
Database is locked error when I'm doing next build like this when I'm building docker image. the command underneath is next build which builds for production. this command calls all api routes:my file is:
how do i solve this?
there is a
.close() on client but not on db? there's a singleton pattern which i haven't tried for sqlite.what would you do?
i believe this should work & it does locally at least but not with docker.
the problem is it sometimes builds perfectly & randomly fails when i delete previously build. so its hard to debug.