palembang-digital / web

Palembang Digital New Revamped Website
http://v2.palembangdigital.org/
0 stars 0 forks source link

Fix production deployment error #26

Closed patal-bot closed 4 months ago

patal-bot commented 4 months ago

Error logs from Vercel:

[22:12:08.508] Running build in Washington, D.C., USA (East) – iad1
[22:12:08.748] Cloning github.com/palembang-digital/web (Branch: main, Commit: ad00ea6)
[22:12:08.759] Skipping build cache, deployment was triggered without cache.
[22:12:09.279] Cloning completed: 531.954ms
[22:12:09.536] Running "vercel build"
[22:12:10.046] Vercel CLI 33.5.4
[22:12:10.420] Warning: Detected "engines": { "node": ">=18.0.0" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version
[22:12:10.436] Installing dependencies...
[22:12:30.517] 
[22:12:30.517] > @palembang-digital/web@0.1.0 prepare
[22:12:30.517] > husky install
[22:12:30.517] 
[22:12:30.606] husky - Git hooks installed
[22:12:30.633] 
[22:12:30.633] added 713 packages in 20s
[22:12:30.633] 
[22:12:30.633] 185 packages are looking for funding
[22:12:30.634]   run `npm fund` for details
[22:12:30.677] Detected Next.js version: 14.1.0
[22:12:30.684] Detected `package-lock.json` generated by npm 7+
[22:12:30.684] Running "npm run build"
[22:12:34.337] 
[22:12:34.338] > @palembang-digital/web@0.1.0 build
[22:12:34.338] > next build
[22:12:34.338] 
[22:12:35.196] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[22:12:35.196] This information is used to shape Next.js' roadmap and prioritize features.
[22:12:35.196] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[22:12:35.196] https://nextjs.org/telemetry
[22:12:35.197] 
[22:12:35.341]    ▲ Next.js 14.1.0
[22:12:35.341] 
[22:12:35.428]    Creating an optimized production build ...
[22:12:47.519]  ✓ Compiled successfully
[22:12:47.520]    Linting and checking validity of types ...
[22:12:54.257]    Collecting page data ...
[22:12:54.653] The `fetchConnectionCache` option is deprecated (now always `true`)
[22:12:55.525]    Generating static pages (0/6) ...
[22:12:55.780] 
   Generating static pages (1/6) 
[22:12:55.807] 
   Generating static pages (2/6) 
[22:12:56.640] NeonDbError: relation "todos" does not exist
[22:12:56.640]     at execute (/vercel/path0/.next/server/chunks/761.js:11:7382)
[22:12:56.640]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[22:12:56.640]     at async eR.execute (/vercel/path0/.next/server/chunks/761.js:33:28480)
[22:12:56.641]     at async b.findAll (/vercel/path0/.next/server/app/api/todos/route.js:1:19356)
[22:12:56.641]     at async index (/vercel/path0/.next/server/app/api/todos/route.js:1:1275)
[22:12:56.641]     at async /vercel/path0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:42484
[22:12:56.641]     at async eI.execute (/vercel/path0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:32486)
[22:12:56.641]     at async eI.handle (/vercel/path0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:43737)
[22:12:56.641]     at async exportAppRoute (/vercel/path0/node_modules/next/dist/export/routes/app-route.js:77:26)
[22:12:56.642]     at async exportPageImpl (/vercel/path0/node_modules/next/dist/export/worker.js:175:20) {
[22:12:56.642]   code: '42P01',
[22:12:56.642]   sourceError: undefined
[22:12:56.642] }
[22:12:56.833] 
   Generating static pages (4/6) 
[22:12:57.165] NeonDbError: relation "todos" does not exist
[22:12:57.165]     at execute (/vercel/path0/.next/server/chunks/761.js:11:7382)
[22:12:57.165]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[22:12:57.166]     at async eR.execute (/vercel/path0/.next/server/chunks/761.js:33:28480)
[22:12:57.166]     at async b.findAll (/vercel/path0/.next/server/app/api/todos/route.js:1:19356)
[22:12:57.166]     at async n (/vercel/path0/.next/server/app/about/page.js:1:9719) {
[22:12:57.166]   code: '42P01',
[22:12:57.166]   sourceError: undefined
[22:12:57.167] }
[22:12:57.430] NeonDbError: relation "todos" does not exist
[22:12:57.432]     at execute (/vercel/path0/.next/server/chunks/761.js:11:7382)
[22:12:57.432]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[22:12:57.432]     at async eR.execute (/vercel/path0/.next/server/chunks/761.js:33:28480)
[22:12:57.433]     at async b.findAll (/vercel/path0/.next/server/app/api/todos/route.js:1:19356)
[22:12:57.433]     at async n (/vercel/path0/.next/server/app/about/page.js:1:9719) {
[22:12:57.437]   code: '42P01',
[22:12:57.437]   sourceError: undefined
[22:12:57.437] }
[22:12:57.582] 
[22:12:57.583] Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
[22:12:57.584] 
[22:12:57.585] NeonDbError: relation "todos" does not exist
[22:12:57.585]     at execute (/vercel/path0/.next/server/chunks/761.js:11:7382)
[22:12:57.586]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[22:12:57.586]     at async eR.execute (/vercel/path0/.next/server/chunks/761.js:33:28480)
[22:12:57.586]     at async b.findAll (/vercel/path0/.next/server/app/api/todos/route.js:1:19356)
[22:12:57.586]     at async n (/vercel/path0/.next/server/app/about/page.js:1:9719)
[22:12:57.592] 
 ✓ Generating static pages (6/6) 
[22:12:57.596] 
[22:12:57.596] > Export encountered errors on following paths:
[22:12:57.596]  /page: /
[22:12:57.638] Error: Command "npm run build" exited with 1
[22:12:57.970] 
ariefrahmansyah commented 4 months ago

Kayaknya harus siapin script buat DB migrate @rbernanda di package.json Terus tambahin scriptnya di vercel build command