Next.js with PNPM build error

Tried to deploy Nextjs project which uses PNPM, but at end of the build process I get below error

Project: saleor/react-storefront
Build command: npx pnpm i --store=node_modules/.pnpm-store && npx pnpm run build
Build output directory: out
Environment variables:
NODE_VERSION 16
NPM_FLAGS --legacy-peer-deps

Error: Asset ".next/cache/webpack/client-production/0.pack" is over the 25MiB limit. Size: 35707944 bytes

25MB is a hard limit that Cloudflare Pages has for individual files.

Have you tried building your site with a normal npm run build instead?

1 Like

Yes, it doesn’t work that way.

I tried using default next.js build commands and it worked.

:partying_face: glad to hear!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.