I am getting 2 errors when deploying to vercel:
- No Sentry auth token configured
- Module not found
I fixed the first error by following the suggestion described right below the first error log.
But for the second one, I tried serveral times and I am still getting the same error.
It looks like dynamic import cannot find the module but I couldn’t find why.
It has been fine all the time following the teaching on the video until this part.
const IssueForm = dynamic(() => import(“@/app/issues/_components/IssueForm”), {
ssr: false,
loading: () => ,
});
Can anyone help?
Thanks in advance.
Following is the error log
Building46s
20:23:21.668 Running build in Washington, D.C., USA (East) – iad1 (Hive)
20:23:21.797 Cloning GitHub - fkim98/issue-tracker (Branch: main, Commit: 146f2ec)
20:23:22.090 Cloning completed: 292.782ms
20:23:22.166 Previous build cache not available
20:23:22.329 Running “vercel build”
20:23:22.769 Vercel CLI 32.4.1
20:23:23.136 Installing dependencies…
20:23:43.352
20:23:43.353 added 586 packages in 20s
20:23:43.353
20:23:43.353 174 packages are looking for funding
20:23:43.353 run npm fund
for details
20:23:43.376 Detected Next.js version: 13.5.4
20:23:43.377 Running “prisma generate && prisma migrate deploy && next build”
20:23:45.853 Prisma schema loaded from prisma/schema.prisma
20:23:46.297
20:23:46.298 Generated Prisma Client (v5.3.1) to ./node_modules/@prisma/client in 78ms
20:23:46.298
20:23:46.298 Start using Prisma Client in Node.js (See: Prisma Client)
20:23:46.298 20:23:46.299 import { PrismaClient } from '@prisma/client' 20:23:46.299 const prisma = new PrismaClient() 20:23:46.299
20:23:46.299 or start using Prisma Client at the edge (See: What is Accelerate)
20:23:46.299 20:23:46.300 import { PrismaClient } from '@prisma/client/edge' 20:23:46.300 const prisma = new PrismaClient() 20:23:46.300
20:23:46.300
20:23:46.300 See other ways of importing Prisma Client: Prisma Client
20:23:46.301
20:23:46.988 Prisma schema loaded from prisma/schema.prisma
20:23:46.996 Datasource “db”: MySQL database “issue-tracker” at “aws.connect.psdb.cloud”
20:23:47.534
20:23:47.535 1 migration found in prisma/migrations
20:23:47.535
20:23:48.313
20:23:48.313 No pending migrations to apply.
20:23:49.065 Attention: Next.js now collects completely anonymous telemetry regarding usage.
20:23:49.065 This information is used to shape Next.js’ roadmap and prioritize features.
20:23:49.066 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:
20:23:49.066 Next.js - Telemetry
20:23:49.066
20:23:49.151 Creating an optimized production build …
20:24:02.982 error - No Sentry auth token configured. Source maps will not be uploaded.
20:24:02.982 To fix this, use Sentry’s Vercel integration to automatically set the SENTRY_AUTH_TOKEN environment variable: Sentry – Vercel
20:24:02.982
20:24:07.371 Failed to compile.
20:24:07.372
20:24:07.373 ./app/issues/edit/[id]/page.tsx:7:32
20:24:07.373 Module not found: Can’t resolve ‘@/app/issues/_components/IssueForm’
20:24:07.374 5 import IssueFormSkeleton from “./loading”;
20:24:07.374 6
20:24:07.375 > 7 const IssueForm = dynamic(() => import(“@/app/issues/_components/IssueForm”), {
20:24:07.375 ^
20:24:07.375 8 ssr: false,
20:24:07.375 9 loading: () => ,
20:24:07.375 10 });
20:24:07.376
20:24:07.376 Module Not Found | Next.js
20:24:07.376
20:24:07.376 ./app/issues/new/page.tsx:4:32
20:24:07.376 Module not found: Can’t resolve ‘@/app/issues/_components/IssueForm’
20:24:07.376 2 import IssueFormSkeleton from “./loading”;
20:24:07.384 3
20:24:07.384 > 4 const IssueForm = dynamic(() => import(“@/app/issues/_components/IssueForm”), {
20:24:07.384 ^
20:24:07.384 5 ssr: false,
20:24:07.384 6 loading: () => ,
20:24:07.384 7 });
20:24:07.384
20:24:07.384 Module Not Found | Next.js
20:24:07.385
20:24:07.385
20:24:07.385 > Build failed because of webpack errors
20:24:07.426 Error: Command “prisma generate && prisma migrate deploy && next build” exited with 1