Closed robthepaper closed 1 year ago
This is the exact message when building in vercel
01:29:29.423 | at new Database (/vercel/path0/node_modules/.pnpm/better-sqlite3@8.1.0/node_modules/better-sqlite3/lib/database.js:59:9)
Hi, if it works on your local machine it might be related to Vercel. I have close to 0 experience with Vercel.
Hi, thanks for your reply, indeed, I just read on vercel's website (https://vercel.com/guides/is-sqlite-supported-in-vercel) that it is not supported.
Hi, no problem in dev mode but when going in prod, the build gives error. I've tried different ways to get the path like :
import path from 'path' const dbPath = path.join(process.cwd(), 'data', 'database.db') console.log('dbPath', dbPath)
but it still can't find the database, do you have a idea on how to make it work in production ?