Hi,
I’m trying to deploy an app to vercel in next.js. Everything works locally, however when I try access the page with the login button I receive this error on the vercel dashboard. It seems that during the build process the dynamic routes aren’t fully created for the auth0 api. Do you know how I can try solve this issue?
Error: Cannot find module './chunks/264.js'
Require stack:
- /var/task/.next/server/webpack-runtime.js
- /var/task/.next/server/app/api/auth/[auth0]/route.js
- /var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/require.js
- /var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/next-server.js
- /var/task/___next_launcher.cjs
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at /var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/require-hook.js:54:36
at Module._load (node:internal/modules/cjs/loader:922:27)
at e.<computed>._module.Module._load (/var/task/___vc/__launcher/__launcher.js:14:2079)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at mod.require (/var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/require-hook.js:64:28)
at require (node:internal/modules/cjs/helpers:119:18)
at t.f.require (/var/task/.next/server/webpack-runtime.js:1:1391)
at /var/task/.next/server/webpack-runtime.js:1:864
at Array.reduce (<anonymous>) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/var/task/.next/server/webpack-runtime.js',
'/var/task/.next/server/app/api/auth/[auth0]/route.js',
'/var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/require.js',
'/var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/next-server.js',
'/var/task/___next_launcher.cjs'
],
page: '/api/auth/me'
}
Error: Cannot find module './chunks/264.js'
Require stack:
- /var/task/.next/server/webpack-runtime.js
- /var/task/.next/server/app/api/auth/[auth0]/route.js
- /var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/require.js
- /var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/next-server.js
- /var/task/___next_launcher.cjs
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at /var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/require-hook.js:54:36
at Module._load (node:internal/modules/cjs/loader:922:27)
at e.<computed>._module.Module._load (/var/task/___vc/__launcher/__launcher.js:14:2079)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at mod.require (/var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/require-hook.js:64:28)
at require (node:internal/modules/cjs/helpers:119:18)
at t.f.require (/var/task/.next/server/webpack-runtime.js:1:1391)
at /var/task/.next/server/webpack-runtime.js:1:864
at Array.reduce (<anonymous>) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/var/task/.next/server/webpack-runtime.js',
'/var/task/.next/server/app/api/auth/[auth0]/route.js',
'/var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/require.js',
'/var/task/node_modules/.pnpm/next@13.5.3_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/next-server.js',
'/var/task/___next_launcher.cjs'
],
page: '/api/auth/me'
}
Error: Runtime exited with error: exit status 1
Runtime.ExitError
The route.js file is:
import { handleAuth } from '@auth0/nextjs-auth0';
export const GET = handleAuth();