Vercel builds not working and I haven’t done any ground breaking changes.
My Next.js builds work locally and I even disabled --turbopack from my build command, but it’s still throwing me errors like it can’t find tailwind, etc…
It was working earlier and now its failing across all branches including ones that worked previously.
For example I deleted a console.log and pushed it to see if it would work and it failed.
Please help, I also have all dependencies installed and haven’t changed my nextjs.config.mjs at all.
Example logging (with npm run build without turbopack)
- /vercel/path0/node_modules/next/dist/build/index.js
22:54:50.041
- /vercel/path0/node_modules/next/dist/cli/next-build.js
22:54:50.041
at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
22:54:50.041
at /vercel/path0/node_modules/next/dist/server/require-hook.js:55:36
22:54:50.041
at Function.resolve (node:internal/modules/helpers:190:19)
22:54:50.042
at loadPlugin (/vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:53:32)
22:54:50.042
at /vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:185:56
22:54:50.042
at Array.map (<anonymous>)
22:54:50.042
at getPostCssPlugins (/vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:185:47)
22:54:50.042
at async /vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/index.js:125:36
22:54:50.042
22:54:50.042
app/layout.tsx
22:54:50.042
An error occurred in `next/font`.
22:54:50.042
22:54:50.042
Error: Cannot find module 'tailwindcss'
Example logging with turbopack
Detected Next.js version: 15.3.1
22:09:26.057
Running "npm run build"
22:09:26.179
22:09:26.179
> nextjs@0.1.0 build
22:09:26.179
> next build --turbopack
22:09:26.179
22:09:26.740
⨯ Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
22:09:26.741
⚠ Support for Turbopack builds is experimental. We don't recommend deploying mission-critical applications to production.
22:09:26.741
22:09:26.741
- Turbopack currently always builds production sourcemaps for the browser. This will include project sourcecode if deployed to production.
22:09:26.741
- It is expected that your bundle size might be different from `next build` with webpack. This will be improved as we work towards stability.
22:09:26.741
- This build is without disk caching; subsequent builds will become faster when disk caching becomes available.
22:09:26.742
- When comparing output to webpack builds, make sure to first clear the Next.js cache by deleting the `.next` directory.
22:09:26.742
22:09:26.742
Provide feedback for Turbopack builds at https://github.com/vercel/next.js/discussions/77721
22:09:26.748
22:09:26.748
> Build error occurred
22:09:26.753
[Error: Cannot find package '@next/bundle-analyzer' imported from /vercel/path0/next.config.mjs] {
22:09:26.753
code: 'ERR_MODULE_NOT_FOUND'
22:09:26.753
}
22:09:26.771
Error: Command "npm run build" exited with 1