Hi @feliprado! Welcome to the Vercel Community ![]()
Thanks for the detailed description. Letās tackle this strange issue with some quick checks:
- Node.js Version: Ensure consistency with an
.nvmrcfile:
echo "18.17.0" > .nvmrc # Replace with your project's Node version
- Next.js Version: Try downgrading:
npm install next@14.1.0npm install next@14.1.0
- Babel: Check for custom configs interfering with Next.js.
- TypeScript: Verify
tsconfig.jsoncompatibility with your Next.js version. - ESLint: Temporarily disable to isolate the issue:
mv .eslintrc.json .eslintrc.json.bakmv .eslintrc.json .eslintrc.json.bak
- Next.js Cache: Clear it:
rm -rf .nextrm -rf .next
- Dependencies: Update all:
npx npm-check-updates -u && npm installnpx npm-check-updates -u && npm install
- File Encoding: Ensure UTF-8 without BOM for all files.
- Environment Variables: Review, especially in API routes.
- Experimental Flag: Add to
package.jsonscripts:
"dev": "node --experimental-vm-modules node_modules/next/dist/bin/next dev""dev": "node --experimental-vm-modules node_modules/next/dist/bin/next dev"
(Do the same for ābuildā and āstartā scripts)
If these donāt work, try creating a minimal reproduction.
Good luck, and let us know how it goes!