pnpm build fails after create t3-app

I did pnpm create t3-app@latest qqq --CI --noGit --trpc --drizzle --nextAuth --tailwind --dbProvider postgres cd qqq Filled in .env, pnpm db:push pnpm build This fails with
Failed to compile. ./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?page=%2Fapi%2Fauth%2F%5B...nextauth%5D%2Froute&name=app%2Fapi%2Fauth%2F%5B...nextauth%5D%2Froute&pagePath=private-next-app-dir%2Fapi%2Fauth%2F%5B...nextauth%5D%2Froute.ts&appDir=%2FUsers%2Fstaguer%2FDeveloper%2Ft%2Fqqq%2Fsrc%2Fapp&appPaths=%2Fapi%2Fauth%2F%5B...nextauth%5D%2Froute&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&nextConfigExperimentalUseEarlyImport=&preferredRegion=&middlewareConfig=e30%3D! + 229 modules Unexpected end of JSON input Build failed because of webpack errors
pnpm run dev also fails but with other issues (seem related to https://github.com/nextauthjs/next-auth/discussions/10058) Thanks
1 Reply
NoGoodNick
NoGoodNickOP3w ago
removing --nextAuth fixes it but I want auth I'm running into this issue again. I found that removing the ❌ emoji from the T3-generated src/app/api/trpc/[trpc]/route.ts file fixes one of the Unexpected end of JSON input errors but others remain and I'm not sure what causes those. Is this a webpack issue? I've tried this in a couple of containers and it only reproes on my dev laptop so it looks like something specific to my machine.

Did you find this page helpful?