React

NextJS์—์„œ Prisma๋ฅผ ์‚ฌ์šฉํ•œ Vercel์— ๋ฐฐํฌ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

martinooo 2024. 8. 9. 14:34

Next.js

 

 

 

๐Ÿคท‍โ™‚๏ธ Next.js, Prisma, Postgresql ํ”„๋กœ์ ํŠธ


์ง€๊ธˆ Next.js, Prisma, Postgresql ํ™œ์šฉํ•ด์„œ ๊ฐœ์ธ ํ”„๋กœ์ ํŠธ๋กœ Vercel์— ๋ฐฐํฌํ•˜๋ ค๋Š” ์ฒจ ๋ณด๋Š” ์—๋Ÿฌ ๋ฉ”์‹œ์ง€์— ํ™ฉ๋‹นํ–ˆ์Šต๋‹ˆ๋‹ค.

 

๋กœ์ปฌ์—์„œ ๋นŒ๋“œ๋„ ์ž˜๋˜๊ณ  ํ™˜๊ฒฝ๋ณ€์ˆ˜๋„ ์ž˜ ์„ธํŒ…๋˜์–ด ์žˆ๊ณ  ๊ณ„์† ๋ฌธ์ œํ•ด๊ฒฐ์„ ์œ„ํ•ด์„œ ๊ณจ๋จธ๋ฆฌ๋ฅผ ์•“๊ณ  ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

 

 

 

๋ฌธ์ œ์˜ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€

Learn how: https://pris.ly/d/vercel-build
    at fa (/vercel/path0/node_modules/@prisma/client/runtime/library.js:33:69)
    at new t (/vercel/path0/node_modules/@prisma/client/runtime/library.js:131:739)
    at 3822 (/vercel/path0/.next/server/app/api/auth/check-email/route.js:1:1860)
    at t (/vercel/path0/.next/server/webpack-runtime.js:1:143)
    at 1862 (/vercel/path0/.next/server/app/api/auth/check-email/route.js:1:957)
    at t (/vercel/path0/.next/server/webpack-runtime.js:1:143)
    at r (/vercel/path0/.next/server/app/api/auth/check-email/route.js:1:2422)
    at /vercel/path0/.next/server/app/api/auth/check-email/route.js:1:2461
    at t.X (/vercel/path0/.next/server/webpack-runtime.js:1:1285)
    at /vercel/path0/.next/server/app/api/auth/check-email/route.js:1:2435 {
  clientVersion: '5.16.1',
  errorCode: undefined
}
> Build error occurred
Error: Failed to collect page data for /api/auth/check-email
    at /vercel/path0/node_modules/next/dist/build/utils.js:1268:15

 

Prisma ๊ด€๋ จ๋œ ์—๋Ÿฌ ๊ฐ™๊ธฐ๋„ ํ•˜๊ณ  ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์…‹ํŒ…์ด ์ž˜๋ชป๋œ ์—๋Ÿฌ์ธ ๊ฑฐ ๊ฐ™๊ธฐ๋„ ํ•˜๋ฉด์„œ ๋„ํ†ต ์ดํ•ด๊ฐ€ ๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.

 

๋“œ๋””์–ด ๋ฌธ์ œ์˜ ์›์ธ์„ ์ฐพ์•˜์Šต๋‹ˆ๋‹ค.

build ๊ณผ์ •์—์„œ Prisma๋Š” prisma generate ๋ช…๋ น์–ด๋กœ schema.prisma ํŒŒ์ผ์— ๋ณ€๊ฒฝ ์‚ฌํ•ญ์ด๋‚˜ ์Šคํ‚ค๋งˆ ๊ตฌ์กฐ๊ฐ€ ๋ณ€๊ฒฝ๋˜์—ˆ์„ ๋•Œ prisma.client ์ƒํƒœ๋ฅผ ์ตœ์‹ ์œผ๋กœ ์œ ์ง€ํ•˜๊ธฐ์œ„ํ•ด์„œ ์ตœ์‹ ํ™”๋ฅผ ์‹œ์ผœ์•ผ ๋˜๋Š”๋ฐ build ๊ณผ์ •์—์„œ ํ•ด๋‹น ๋ช…๋ น์–ด๋ฅผ ์ƒ๋žตํ•ด์„œ ๋‚˜ํƒ€๋‚˜๋Š” ์—๋Ÿฌ์˜€์Šต๋‹ˆ๋‹ค.

 

ํ”„๋กœ์ ํŠธ์— package.json์—์„œ build scripts์— prisma generate ์ถ”๊ฐ€ํ•ด ์ฃผ๋ฉด Vercel ๋ฐฐํฌ ์‹œ์— prisma schema๋ฅผ ์ตœ์‹ ์ƒํƒœ๋ฅผ ์œ ์ง€ํ•ด ์ฃผ๊ธฐ ๋•Œ๋ฌธ์— ์˜ค๋ฅ˜๋ฅผ ํ•ด๊ฒฐํ•ฉ๋‹ˆ๋‹ค.

 

package.json build scripts์— prisma generate ๋ช…๋ น์–ด๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

 

build ๊ณผ์ •์—์„œ prisma generate ๋ช…๋ น์–ด๋กœ schema๋ฅผ ์ตœ์‹ ํ™” ํ•ด์ฃผ๋ฉด์„œ Vercel ๋ฐฐํฌ๋ฅผ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค. 

 

vercel

 

 

 

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋ฟŒ์‹œ๊ธฐ

https://itibiza.tistory.com/entry/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8-%EC%8B%9C%EB%A6%AC%EC%A6%88-javascript-%ED%95%A8%EC%88%98-%EC%8A%A4%EC%BD%94%ED%94%84-%EC%9D%B4%ED%95%B4%ED%95%98%EA%B8%B0

 

[์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์‹œ๋ฆฌ์ฆˆ] javascript ํ•จ์ˆ˜ ์Šค์ฝ”ํ”„ ์ดํ•ดํ•˜๊ธฐ

๋ณธ๋ก ์— ์•ž์„œ์•ˆ๋…•ํ•˜์„ธ์š”! ์ด๊ธ€์—์„œ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์‹œ๋ฆฌ์ฆˆ - javascript ์Šค์ฝ”ํ”„์˜ ๊ฐœ๋…๊ณผ ์˜ˆ์ œ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ(javascript)๋Š” ๋™์  ์ธํ„ฐํ”„๋ฆฌํ„ฐ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด์ด๊ธฐ ๋•Œ๋ฌธ์— ๋‹ค๋ฅธ ์ „ํ†ต์ 

itibiza.tistory.com

 


 

์žฌ๋ฐŒ๋Š” ์˜ค๋Š˜์˜ ๋ ๋ณ„ ์šด์„ธ ๋ณด๊ณ  ๊ฐ€์„ธ์š”! 

 

 

https://cometruedream.tistory.com/247

 

[React] Tailwind ํ•œ์ค„, ๋‘์ค„, ์„ธ์ค„ ํšจ๊ณผ className ์ปค์Šคํ…€

๐Ÿคท‍โ™‚๏ธ Tailwind ํ•œ์ค„, ๋‘์ค„, ์„ธ์ค„ ํšจ๊ณผํ”„๋กœ์ ํŠธ ์ง„ํ–‰์ค‘ ๋ฐฐ๋„ˆ ๋งํฌ์— URL ๊ธธ์ด๊ฐ€ ๋„ˆ๋ฌด ๊ธธ์–ด์„œ 3์ค„ ํšจ๊ณผ ์ฒ˜๋ฆฌ๋ฅผ ํ•ด์•ผ ํ–ˆ์Šต๋‹ˆ๋‹ค. React + Tailwind CSS ์…‹ํŒ…๋œ ํ”„๋กœ์ ํŠธ ์—ฌ์„œ CSS ํŒŒ์ผ & style ํƒœ๊ทธ๋ฅผ ์‚ฌ์šฉํ•˜

cometruedream.tistory.com

 

 

https://cometruedream.tistory.com/243

 

NestJS Lifecycle (์ƒ๋ช…์ฃผ๊ธฐ) ๊ฐœ๋…

๐Ÿคท‍โ™‚๏ธ ๋ณธ๋ก ์— ์•ž์„œ Nest JS ๊ฐœ๋…?Nest JS๋Š” Node JS ๊ธฐ๋ฐ˜์œผ๋กœ ํ•œ ์„œ๋ฒ„ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ํ”„๋ ˆ์ž„์›Œํฌ ์ž…๋‹ˆ๋‹ค. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋Š” ์ƒ๋‹นํžˆ ์˜ค๋žซ๋™์•ˆ Express ๊ธฐ๋ฐ˜์œผ๋กœ ์„œ๋ฒ„ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ฐœ๋ฐœ์—์„œ ์••๋„์ ์ธ ์ 

cometruedream.tistory.com

 

 

https://cometruedream.tistory.com/242

 

๋ฆฌ์•กํŠธ Vite Proxy ํ™œ์šฉํ•œ CORS ์˜ค๋ฅ˜ ํ•ด๊ฒฐ

๐Ÿคท‍โ™‚๏ธ ๋ณธ๋ก ์— ์•ž์„œํ”„๋ก ํŠธ์—”๋“œ ๋ฒˆ๋“ค๋Ÿฌ ๊ฐœ๋…๊ณผ webpack vs vite ๋น„๊ต์— ๋Œ€ํ•ด์„œ ๊ณต๋ถ€๋ฅผ ํ•˜๊ณ  ๊ธ€์„ ๋ณด์‹œ๋ฉด ๋” ๋งŽ์€ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค^^ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœ์„ ์œ„ํ•œ ๋ฒˆ๋“ค๋Ÿฌ ๊ฐœ๋…๊ณผ webpack vs vite ๋น„๊ตhttps://comet

cometruedream.tistory.com

 

 

https://cometruedream.tistory.com/241

 

React ํด๋”๊ตฌ์กฐ FSD ๊ธฐ๋Šฅ ๋ถ„ํ™œ ์„ค๊ณ„ ์•„ํ‚คํ…์ฒ˜

๐Ÿคท‍โ™‚๏ธ ๋ณธ๋ก ์— ์•ž์„œํ”„๋กœ์ ํŠธ๋ฅผ ์‹œ์ž‘ํ•˜๊ธฐ์— ์•ž์„œ ํด๋” ๊ตฌ์กฐ, ์„ค๊ณ„์— ๋Œ€ํ•œ ์•„ํ‚คํ…์ฒ˜๋ฅผ ๋งŒ๋“œ๋Š” ๊ฒƒ์€ ์ƒ๋‹นํžˆ ์–ด๋ ต๋‹ค. ์ด๋ฒˆ ํ”„๋กœ์ ํŠธ์— React FSD ํด๋”๊ตฌ์กฐ ์•„ํ‚คํ…์ฒ˜๋ฅผ ์„ค๊ณ„ํ•  ์˜ˆ์ •์ด๋ผ์„œ FSD ์•„ํ‚คํ…

cometruedream.tistory.com

 

 

https://cometruedream.tistory.com/244

 

์‰ฝ๊ฒŒ ์ดํ•ดํ•˜๊ณ  ์‚ฌ์šฉํ• ์ˆ˜ ์žˆ๋Š” Prisma ๋ช…๋ น์–ด ์ •๋ฆฌ

๐Ÿคท‍โ™‚๏ธ Prisma ๋ช…๋ น์–ด ๋ณธ๋ก ์— ์•ž์„œ Prisma๋ž€?Nest JS ํ”„๋ ˆ์ž„์›Œํฌ์™€ Prisma ORM์„ ํ™œ์šฉํ•ด์„œ ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋ฉด์„œ Prisma๋Š” Node JS ๊ธฐ๋ฐ˜์— ํ”„๋ ˆ์ž„์›Œํฌ/๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์™€ ์ƒํ˜ธ์ž‘์šฉ์ด ์ž˜๋˜๋ฉฐ Prisma + DB ์—ฐ๋™์œผ

cometruedream.tistory.com