|
1 |
| -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). |
| 1 | +# Next.js Local Docker Postgres setup |
2 | 2 |
|
3 |
| -## Getting Started |
| 3 | +This is a quick Next.js site to test the Local Docker with Vercel Postgres support. The [doc Vercel offers](https://vercel.com/docs/storage/vercel-postgres/local-development#local-development-with-vercel-postgres) is no longer up to date and the connection never works. This is due to the `@drizzle-orm` and `@vercel/postgres` uses different version of `@neondatabase/serverless` causes this. The only possible fix for now is to override the `@neondatabase/serverless` through `package.json`. |
4 | 4 |
|
5 |
| -First, run the development server: |
| 5 | +For `npm` user: |
6 | 6 |
|
7 |
| -```bash |
8 |
| -npm run dev |
9 |
| -# or |
10 |
| -yarn dev |
11 |
| -# or |
12 |
| -pnpm dev |
13 |
| -# or |
14 |
| -bun dev |
| 7 | +```json |
| 8 | +"overrides": { |
| 9 | + "@neondatabase/serverless": "0.10.4" |
| 10 | +} |
15 | 11 | ```
|
16 | 12 |
|
17 |
| -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 13 | +For `pnpm` user: |
18 | 14 |
|
19 |
| -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
20 |
| - |
21 |
| -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. |
22 |
| - |
23 |
| -## Learn More |
24 |
| - |
25 |
| -To learn more about Next.js, take a look at the following resources: |
26 |
| - |
27 |
| -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
28 |
| -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
29 |
| - |
30 |
| -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
| 15 | +```json |
| 16 | +"pnpm": { |
| 17 | + "overrides": { |
| 18 | + "@neondatabase/serverless": "^0.10.4" |
| 19 | + } |
| 20 | +} |
| 21 | +``` |
31 | 22 |
|
32 |
| -## Deploy on Vercel |
| 23 | +`package-lock.json` or `pnpm-lock.yaml` needs to be remove and rebuild as well as the `node_modules`. |
33 | 24 |
|
34 |
| -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
| 25 | +## Resource |
35 | 26 |
|
36 |
| -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
| 27 | +- [Vercel GitHub issue](https://github.com/vercel/storage/issues/123#issuecomment-2500543485) |
| 28 | +- [Initial explanation](https://github.com/vercel/storage/issues/123#issuecomment-2500543485) |
| 29 | +- [Detailed blogpost](https://gal.hagever.com/posts/running-vercel-postgres-locally) |
| 30 | +- [Vercel blogpost](https://vercel.com/docs/storage/vercel-postgres/local-development#local-development-with-vercel-postgres) |
0 commit comments