vercel icon indicating copy to clipboard operation
vercel copied to clipboard

Production builds require all dependencies for Next.js 15.2.4

Open jasnsy opened this issue 9 months ago • 1 comments

Encountered an issue with the Vercel CLI 41.4.1 build process. Only affecting production builds, works fine for all pre-production/preview branches (i.e. development and test build and deploy previews just fine). What resolved it was either tagging the build command to install all dev dependencies or manually moving all dev dependencies to the required dependencies. See attached screenshots.

Image

Production build:

Image

Test build after merging prod back into test

Image Image Image

Moving every package one at a time to dependencies to see which one it was:

Image

Things I've tried (before finding the dependency solution) was forcing no build cache with env variables, nuking node_modules, lock file, and did a npm cache clean --force, install. Package upgrades and down grades.

jasnsy avatar Mar 27 '25 15:03 jasnsy

This issue is a big deal since all work done in V0 can't be deploy in production.

Spent a lot of hours trying to solve it with V0 chat bot, but it doesn't get it, it end up changing the whole project code and going mental without solving the real problem.

Image

codeplaygroundspace avatar Apr 15 '25 07:04 codeplaygroundspace