sadmann7 / skateshop

An open source e-commerce skateshop build with everything new in Next.js.
https://skateshop.sadmn.com
MIT License
5.23k stars 745 forks source link

error TypeError: fetch failed when running pnpm run dev #64

Open hoanganhchang opened 1 year ago

hoanganhchang commented 1 year ago

When running pnpm run dev, I got error: error TypeError: fetch failed `error TypeError: fetch failed

sadmann7 commented 1 year ago

I fixed the window is undefined error.

The second one looks unfamiliar to me. Did you try reinstalling after removing node_modules, and .next.

Also you need to put this at the end of the DATABASE_URL: ?ssl={"rejectUnauthorized":true}

The url will look like this: DATABASE_URL="mysql://YOUR_MYSQL_URL_HERE?ssl={"rejectUnauthorized":true}"

B-YS commented 10 months ago

I also got this error, here is my sql url DATABASE_URL="mysql://root:root@localhost:3306/sk5?ssl={"rejectUnauthorized":true}&&zeroDateTimeBehavior=convertToNull"

richard16611 commented 9 months ago

any updates on this?