Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: Having issues running Payload CMS running on NextJS app #723

Open
1 task done
himanshu-ntml opened this issue Mar 27, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@himanshu-ntml
Copy link

himanshu-ntml commented Mar 27, 2024

next-on-pages environment related information

System:
        Platform: darwin
        Arch: arm64
        Version: Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:43 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6000
        CPU: (10) arm64 Apple M1 Max
        Memory: 64 GB
        Shell: /bin/zsh
Package Manager Used: npm (10.4.0)

Relevant Packages:
        @cloudflare/next-on-pages: 1.11.0
        vercel: N/A
        next: N/A

Description

I am trying to run Payload CMS which is running on nextjs app and its currently being hosted by Payload team on vercel. I have done setup of next on page on this project but still facing below errors.

when i execute "pnpm run pages:build"

here is link to code repo: https://github.com/himanshu-ntml/nextjs-payload

> next-latest-starter@0.1.0 pages:build /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta
> npx @cloudflare/next-on-pages

⚡️ @cloudflare/next-on-pages CLI v.1.11.0
⚡️ Detected Package Manager: pnpm (8.7.6)
⚡️ Preparing project...
⚡️ Project is ready
⚡️ Building project...
▲  Vercel CLI 33.6.1
▲  Warning: Detected "engines": { "node": ">=18.19.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
▲  Detected `pnpm-lock.yaml` version 6 generated by pnpm 8
▲  WARNING: You should not upload the `.next` directory.
▲  Installing dependencies...
▲  Lockfile is up to date, resolution step is skipped
▲  Already up to date
▲  
▲  Done in 1.2s
▲  Detected Next.js version: 14.2.0-canary.23
▲  Running "pnpm run build"
▲  > next-latest-starter@0.1.0 build /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta
▲  > cross-env NODE_OPTIONS=--no-deprecation next build
▲  ▲ Next.js 14.2.0-canary.23
▲  - Environments: .env
▲  Creating an optimized production build ...
▲  ⚠ You are using an experimental edge runtime, the API might change.
▲  Failed to compile.
▲  ./node_modules/.pnpm/atomically@1.7.0/node_modules/atomically/dist/index.js:5:1
▲  Module not found: Can't resolve 'path'
▲  
▲  https://nextjs.org/docs/messages/module-not-found
▲  
▲  Import trace for requested module:
▲  ./node_modules/.pnpm/conf@10.2.0/node_modules/conf/dist/source/index.js
▲  ./node_modules/.pnpm/payload@3.0.0-alpha.49_@swc+core@1.4.6_@swc+types@0.1.5/node_modules/payload/dist/utilities/telemetry/index.js
▲  ./node_modules/.pnpm/payload@3.0.0-alpha.49_@swc+core@1.4.6_@swc+types@0.1.5/node_modules/payload/dist/utilities/telemetry/events/serverInit.js
▲  ./node_modules/.pnpm/payload@3.0.0-alpha.49_@swc+core@1.4.6_@swc+types@0.1.5/node_modules/payload/dist/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/utilities/getPayloadHMR.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/utilities/createPayloadRequest.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/routes/rest/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/exports/routes.js
▲  ./src/app/(payload)/api/[...slug]/route.ts
▲  ./node_modules/.pnpm/next@14.2.0-canary.23_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js?absolutePagePath=private-next-app-dir%2F(payload)%2Fapi%2F%5B...slug%5D%2Froute.ts&page=%2F(payload)%2Fapi%2F%5B...slug%5D%2Froute&appDirLoader=bmV4dC1hcHAtbG9hZGVyP25hbWU9YXBwJTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2U9JTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2VQYXRoPXByaXZhdGUtbmV4dC1hcHAtZGlyJTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlLnRzJmFwcERpcj0lMkZVc2VycyUyRm5pY29sZXRob21hcyUyRkRlc2t0b3AlMkZFbnZpcm9ubWVudCUyRkRldmVsb3BtZW50JTJGTmV4dEpzUGF5bG9hZEJldGElMkZzcmMlMkZhcHAmYXBwUGF0aHM9JTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2VFeHRlbnNpb25zPXRzeCZwYWdlRXh0ZW5zaW9ucz10cyZwYWdlRXh0ZW5zaW9ucz1qc3gmcGFnZUV4dGVuc2lvbnM9anMmYmFzZVBhdGg9JmFzc2V0UHJlZml4PSZuZXh0Q29uZmlnT3V0cHV0PSZwcmVmZXJyZWRSZWdpb249Jm1pZGRsZXdhcmVDb25maWc9ZTMwJTNEIQ%3D%3D&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!
▲  
▲  ./node_modules/.pnpm/atomically@1.7.0/node_modules/atomically/dist/utils/fs.js:4:1
▲  Module not found: Can't resolve 'fs'
▲  Did you mean './fs'?
▲  Requests that should resolve in the current directory need to start with './'.
▲  Requests that start with a name are treated as module requests and resolve within module directories (node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/next@14.2.0-canary.23_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/bin/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/next@14.2.0-canary.23_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/next@14.2.0-canary.23_react-dom@18.2.0_react@18.2.0/node_modules/next/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/next@14.2.0-canary.23_react-dom@18.2.0_react@18.2.0/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/cross-env@7.0.3/node_modules/cross-env/src/bin/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/cross-env@7.0.3/node_modules/cross-env/src/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/cross-env@7.0.3/node_modules/cross-env/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/cross-env@7.0.3/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/vercel@33.6.1_@swc+core@1.4.6/node_modules/vercel/dist/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/vercel@33.6.1_@swc+core@1.4.6/node_modules/vercel/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/vercel@33.6.1_@swc+core@1.4.6/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/@cloudflare+next-on-pages@1.11.0_@cloudflare+workers-types@4.20240320.1_vercel@33.6.1_wrangler@3.38.0/node_modules/@cloudflare/next-on-pages/bin/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/@cloudflare+next-on-pages@1.11.0_@cloudflare+workers-types@4.20240320.1_vercel@33.6.1_wrangler@3.38.0/node_modules/@cloudflare/next-on-pages/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/@cloudflare+next-on-pages@1.11.0_@cloudflare+workers-types@4.20240320.1_vercel@33.6.1_wrangler@3.38.0/node_modules/@cloudflare/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta/node_modules/.pnpm/@cloudflare+next-on-pages@1.11.0_@cloudflare+workers-types@4.20240320.1_vercel@33.6.1_wrangler@3.38.0/node_modules, /Users/himanshu/Desktop/Environment/Development/NextJsPayloadBeta).
▲  If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
▲  
▲  https://nextjs.org/docs/messages/module-not-found
▲  
▲  Import trace for requested module:
▲  ./node_modules/.pnpm/atomically@1.7.0/node_modules/atomically/dist/index.js
▲  ./node_modules/.pnpm/conf@10.2.0/node_modules/conf/dist/source/index.js
▲  ./node_modules/.pnpm/payload@3.0.0-alpha.49_@swc+core@1.4.6_@swc+types@0.1.5/node_modules/payload/dist/utilities/telemetry/index.js
▲  ./node_modules/.pnpm/payload@3.0.0-alpha.49_@swc+core@1.4.6_@swc+types@0.1.5/node_modules/payload/dist/utilities/telemetry/events/serverInit.js
▲  ./node_modules/.pnpm/payload@3.0.0-alpha.49_@swc+core@1.4.6_@swc+types@0.1.5/node_modules/payload/dist/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/utilities/getPayloadHMR.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/utilities/createPayloadRequest.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/routes/rest/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/exports/routes.js
▲  ./src/app/(payload)/api/[...slug]/route.ts
▲  ./node_modules/.pnpm/next@14.2.0-canary.23_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js?absolutePagePath=private-next-app-dir%2F(payload)%2Fapi%2F%5B...slug%5D%2Froute.ts&page=%2F(payload)%2Fapi%2F%5B...slug%5D%2Froute&appDirLoader=bmV4dC1hcHAtbG9hZGVyP25hbWU9YXBwJTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2U9JTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2VQYXRoPXByaXZhdGUtbmV4dC1hcHAtZGlyJTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlLnRzJmFwcERpcj0lMkZVc2VycyUyRm5pY29sZXRob21hcyUyRkRlc2t0b3AlMkZFbnZpcm9ubWVudCUyRkRldmVsb3BtZW50JTJGTmV4dEpzUGF5bG9hZEJldGElMkZzcmMlMkZhcHAmYXBwUGF0aHM9JTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2VFeHRlbnNpb25zPXRzeCZwYWdlRXh0ZW5zaW9ucz10cyZwYWdlRXh0ZW5zaW9ucz1qc3gmcGFnZUV4dGVuc2lvbnM9anMmYmFzZVBhdGg
▲  9JmFzc2V0UHJlZml4PSZuZXh0Q29uZmlnT3V0cHV0PSZwcmVmZXJyZWRSZWdpb249Jm1pZGRsZXdhcmVDb25maWc9ZTMwJTNEIQ%3D%3D&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!
▲  
▲  ./node_modules/.pnpm/atomically@1.7.0/node_modules/atomically/dist/utils/temp.js:4:1
▲  Module not found: Can't resolve 'path'
▲  
▲  https://nextjs.org/docs/messages/module-not-found
▲  
▲  Import trace for requested module:
▲  ./node_modules/.pnpm/atomically@1.7.0/node_modules/atomically/dist/index.js
▲  ./node_modules/.pnpm/conf@10.2.0/node_modules/conf/dist/source/index.js
▲  ./node_modules/.pnpm/payload@3.0.0-alpha.49_@swc+core@1.4.6_@swc+types@0.1.5/node_modules/payload/dist/utilities/telemetry/index.js
▲  ./node_modules/.pnpm/payload@3.0.0-alpha.49_@swc+core@1.4.6_@swc+types@0.1.5/node_modules/payload/dist/utilities/telemetry/events/serverInit.js
▲  ./node_modules/.pnpm/payload@3.0.0-alpha.49_@swc+core@1.4.6_@swc+types@0.1.5/node_modules/payload/dist/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/utilities/getPayloadHMR.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/utilities/createPayloadRequest.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/routes/rest/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/exports/routes.js
▲  ./src/app/(payload)/api/[...slug]/route.ts
▲  ./node_modules/.pnpm/next@14.2.0-canary.23_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js?absolutePagePath=private-next-app-dir%2F(payload)%2Fapi%2F%5B...slug%5D%2Froute.ts&page=%2F(payload)%2Fapi%2F%5B...slug%5D%2Froute&appDirLoader=bmV4dC1hcHAtbG9hZGVyP25hbWU9YXBwJTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2U9JTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2VQYXRoPXByaXZhdGUtbmV4dC1hcHAtZGlyJTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlLnRzJmFwcERpcj0lMkZVc2VycyUyRm5pY29sZXRob21hcyUyRkRlc2t0b3AlMkZFbnZpcm9ubWVudCUyRkRldmVsb3BtZW50JTJGTmV4dEpzUGF5bG9hZEJldGElMkZzcmMlMkZhcHAmYXBwUGF0aHM9JTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2VFeHRlbnNpb25zPXRzeCZwYWdlRXh0ZW5zaW9ucz10cyZwYWdlRXh0ZW5zaW9ucz1qc3gmcGFnZUV4dGVuc2lvbnM9anMmYmFzZVBhdGg9JmFzc2V0UHJlZml4PSZuZXh0Q29uZmlnT3V0cHV0PSZwcmVmZXJyZWRSZWdpb249Jm1pZGRsZXdhcmVDb25maWc9ZTMwJTNEIQ%3D%3D&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!
▲  
▲  ./node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/types/multipart.js:3:30
▲  Module not found: Can't resolve 'stream'
▲  
▲  https://nextjs.org/docs/messages/module-not-found
▲  
▲  Import trace for requested module:
▲  ./node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/next-fileupload/processMultipart.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/next-fileupload/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/utilities/getDataAndFile.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/utilities/createPayloadRequest.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/routes/rest/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/exports/routes.js
▲  ./src/app/(payload)/api/[...slug]/route.ts
▲  ./node_modules/.pnpm/next@14.2.0-canary.23_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js?absolutePagePath=private-next-app-dir%2F(payload)%2Fapi%2F%5B...slug%5D%2Froute.ts&page=%2F(payload)%2Fapi%2F%5B...slug%5D%2Froute&appDirLoader=bmV4dC1hcHAtbG9hZGVyP25hbWU9YXBwJTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2U9JTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2VQYXRoPXByaXZhdGUtbmV4dC1hcHAtZGlyJTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlLnRzJmFwcERpcj0lMkZVc2VycyUyRm5pY29sZXRob21hcyUyRkRlc2t0b3AlMkZFbnZpcm9ubWVudCUyRkRldmVsb3BtZW50JTJGTmV4dEpzUGF5bG9hZEJldGElMkZzcmMlMkZhcHAmYXBwUGF0aHM9JTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2VFeHRlbnNpb25zPXRzeCZwYWdlRXh0ZW5zaW9ucz10cyZwYWdlRXh0ZW5zaW9ucz1qc3gmcGFnZUV4dGVuc2lvbnM9anMmYmFzZVBhdGg9JmFzc2V0UHJlZml4PSZuZXh0Q29uZmlnT3V0cHV0PSZwcmVmZXJyZWRSZWdpb249Jm1pZGRsZXdhcmVDb25maWc9ZTMwJTNEIQ%3D%3D&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!
▲  
▲  ./node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/types/urlencoded.js:3:20
▲  Module not found: Can't resolve 'stream'
▲  
▲  https://nextjs.org/docs/messages/module-not-found
▲  
▲  Import trace for requested module:
▲  ./node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/next-fileupload/processMultipart.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/next-fileupload/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/utilities/getDataAndFile.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/utilities/createPayloadRequest.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/routes/rest/index.js
▲  ./node_modules/.pnpm/@payloadcms+next@3.0.0-alpha.49_@types+react@18.2.64_http-status@1.6.2_monaco-editor@0.47.0_n_ik3wpnhbrkniznrnom4dn4cxhe/node_modules/@payloadcms/next/dist/exports/routes.js
▲  ./src/app/(payload)/api/[...slug]/route.ts
▲  ./node_modules/.pnpm/next@14.2.0-canary.23_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js?absolutePagePath=private-next-app-dir%2F(payload)%2Fapi%2F%5B...slug%5D%2Froute.ts&page=%2F(payload)%2Fapi%2F%5B...slug%5D%2Froute&appDirLoader=bmV4dC1hcHAtbG9hZGVyP25hbWU9YXBwJTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2U9JTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2VQYXRoPXByaXZhdGUtbmV4dC1hcHAtZGlyJTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlLnRzJmFwcERpcj0lMkZVc2VycyUyRm5pY29sZXRob21hcyUyRkRlc2t0b3AlMkZFbnZpcm9ubWVudCUyRkRldmVsb3BtZW50JTJGTmV4dEpzUGF5bG9hZEJldGElMkZzcmMlMkZhcHAmYXBwUGF0aHM9JTJGKHBheWxvYWQpJTJGYXBpJTJGJTVCLi4uc2x1ZyU1RCUyRnJvdXRlJnBhZ2VFeHRlbnNpb25zPXRzeCZwYWdlRXh0ZW5zaW9ucz10cyZwYWdlRXh0ZW5zaW9ucz1qc3gmcGFnZUV4dGVuc2lvbnM9anMmYmFzZVBhdGg9JmFzc2V0UHJlZml4PSZuZXh0Q29uZmlnT3V0cHV0PSZwcmVmZXJyZWRSZWdpb249Jm1pZGRsZXdhcmVDb25maWc9ZTMwJTNEIQ%3D%3D&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!
▲  
▲  
▲  > Build failed because of webpack errors
▲  ELIFECYCLE  Command failed with exit code 1.
▲  Error: Command "pnpm run build" exited with 1

⚡️ The Vercel build (`pnpm exec vercel build`) command failed. For more details see the Vercel logs above.
⚡️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories.

 ELIFECYCLE  Command failed with exit code 1.

Thanks, feel free to ask any questions incase you have any.

Reproduction

  1. Create a MongoDB atlas or local database
  2. Copy .env.example to .env and update the connection string in MONGODB_URI to new MongoDB URL
  3. run "npm run pages:build" or "yarn run pages:build" or "pnpm run pages:build" according your package manager

Pages Deployment Method

None

Pages Deployment ID

No response

Additional Information

I am trying to create build first before i deploy using "deploy command"

Would you like to help?

  • Would you like to help fixing this bug?
@himanshu-ntml himanshu-ntml added the bug Something isn't working label Mar 27, 2024
@daniloitj
Copy link

Are you using it?

export const runtime = 'edge'

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

No branches or pull requests

2 participants