Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

[vercel] Help. I don't know What's going on #82

Closed
Naiml007 opened this issue Sep 28, 2023 · 2 comments
Closed

[vercel] Help. I don't know What's going on #82

Naiml007 opened this issue Sep 28, 2023 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@Naiml007
Copy link

Screenshot_2023-09-28-19-54-32-844_com brave browser

"Vercel log"

[17:32:49] Running build in Washington, D.C., USA (East) – iad1 (Hive)
[17:32:52] Cloning github.com/Naiml007/Ani-Moopa (Branch: main, Commit: 9d54cb1)
[17:32:52] Skipping build cache, deployment was triggered without cache.
[17:32:53] Cloning completed: 438.846ms
[17:32:53] Running "vercel build"
[17:32:53] Vercel CLI 32.3.1
[17:32:54] Installing dependencies...
[17:32:57] npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
[17:32:57] npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
[17:32:58] npm WARN deprecated workbox-cacheable-response@6.6.0: workbox-background-sync@6.6.0
[17:33:07]
[17:33:07] added 693 packages in 13s
[17:33:07]
[17:33:07] 128 packages are looking for funding
[17:33:07] run npm fund for details
[17:33:07] Detected Next.js version: 13.0.7
[17:33:07] Running "npm run dev"
[17:33:07]
[17:33:07] > moopa@3.6.7 dev
[17:33:07] > next dev
[17:33:07]
[17:33:07] warn - You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env
[17:33:07] warn - You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env
[17:33:07] ready - started server on 0.0.0.0:3000, url: http://localhost:3000
[17:33:08] > [PWA] Compile client (static)
[17:33:08] > [PWA] Auto register service worker with: /vercel/path0/node_modules/next-pwa/register.js
[17:33:08] > [PWA] Service worker: /vercel/path0/public/sw.js
[17:33:08] > [PWA] url: /sw.js
[17:33:08] > [PWA] scope: /
[17:33:08] > [PWA] Build in develop mode, cache and precache are mostly disabled. This means offline support is disabled, but you can continue developing other functions in service worker.
[17:33:08] > [PWA] Compile server
[17:33:08] > [PWA] Compile server
[17:33:13] event - compiled client and server successfully in 5.1s (555 modules)
[17:33:14] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[17:33:14] This information is used to shape Next.js' roadmap and prioritize features.
[17:33:14] 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:
[17:33:14] https://nextjs.org/telemetry
[17:33:14]

@Naiml007 Naiml007 added the 🐛 bug Something isn't working label Sep 28, 2023
@DevanAbinaya
Copy link
Collaborator

DevanAbinaya commented Sep 28, 2023

hi, it's not a bug, I'll tell you what's wrong here,

First Problem

first of all npm run dev is not a build command, build command is npm run build.

Second Problem

the second mistake is never run dev on production, only start with start command either using npm run start or other start command.

Third Problem

third, if you following the documentation for local development here that's not intended for vercel deployment, as the name said it is for developing the app not deploying it, it has a different configuration for vercel deployment.

Fourth Problem you will get error if you don't change your build script in your package.json file

this app required you to have a postgresql database by adding it in your .env file, since I'm using prisma for doing CRUD function it's mandatory to run at least once before building the app, so if you can't access the build command by console you have to include the command in your build script inside package.json, like this:

"build": "npx prisma generate && npx prisma migrate deploy && next build"

If you don't know how deploying next.js app to vercel works, I suggest you to learn it first then deploy this app as you want. I only support the use of this code as a learning material. So please use it with responsible, thanks.

@DevanAbinaya DevanAbinaya pinned this issue Sep 28, 2023
@DevanAbinaya DevanAbinaya changed the title Help. I don't know What's going on [vercel] Help. I don't know What's going on Sep 28, 2023
@Naiml007
Copy link
Author

tnx <3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants