Closed ThamsanQue closed 1 year ago
Try removing the .next folder, and updating the packages.
Ive changed the connection type in db ...from createConnection to createPool and im no longer getting that error ...but now getting this one Cannot read properties of undefined (reading 'findFirst')
Fixed the above error by specifying mode
export const db = drizzle(connection, { schema, mode: 'default' })
When using mysql2 driver with regular MySQL database - you should specify mode: "default".
Also noticed that when i click an page for the first time it doesnt go there ..it hits me with this error: error TypeError [ERR_INVALID_STATE]: Invalid state: ReadableStream is already closed
What could be causing this?
Hello, ive installed the project and added all the env variables but changed the db to local mysql other than planetscale....im trying to add a store from the web app itself but i get this error :
SyntaxError: await is only valid in async functions and the top level bodies of modules at (actionBrowser)/./src/db/index.ts (C:\Users\thams\Garage\skateshop\.next\server\app\(dashboard)\dashboard\stores\new\page.js:12791:1) at __webpack_require__ (C:\Users\thams\Garage\skateshop\.next\server\webpack-runtime.js:33:43) at eval (./src/app/_actions/store.ts:11:61) at (actionBrowser)/./src/app/_actions/store.ts (C:\Users\thams\Garage\skateshop\.next\server\app\(dashboard)\dashboard\stores\new\page.js:12089:1)
Any idea what might be wrong