I am trying to build my nextjs application using 'npm run build'. I have connected my project with Auth0 and it is working when I am using it locally.
I have the .env.local and .env file with the appropriate values in there.
This is the error I get:
Collecting page data ..TypeError: (0 , n.handleAuth) is not a function
at 65055 (C:\Webprojects\DeltoneNGCRM\deltonenextgencrm\.next\server\app\api\auth\[auth0]\route.js:1:13559)
at t (C:\Webprojects\DeltoneNGCRM\deltonenextgencrm\.next\server\webpack-runtime.js:1:143)
at r (C:\Webprojects\DeltoneNGCRM\deltonenextgencrm\.next\server\app\api\auth\[auth0]\route.js:1:14949)
at <unknown> (C:\Webprojects\DeltoneNGCRM\deltonenextgencrm\.next\server\app\api\auth\[auth0]\route.js:1:14976)
at t.X (C:\Webprojects\DeltoneNGCRM\deltonenextgencrm\.next\server\webpack-runtime.js:1:1285)
at <unknown> (C:\Webprojects\DeltoneNGCRM\deltonenextgencrm\.next\server\app\api\auth\[auth0]\route.js:1:14962)
at Object.<anonymous> (C:\Webprojects\DeltoneNGCRM\deltonenextgencrm\.next\server\app\api\auth\[auth0]\route.js:1:15004)
> Build error occurred
[Error: Failed to collect page data for /api/auth/[auth0]] {
type: 'Error'
}
I have a route.js file located in '/api/auth/[auth0]/route.js' which contains the following code:
import { handleAuth } from "@auth0/nextjs-auth0";
export const GET = handleAuth();
Can someone please help me out with this?
Researched on Google for Auth0 build related issues.
Deleted node_modules and package-lock.json and reinstalled the packages
Previous AWS Amplify builds (before Auth0) are successful.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744748415a4591446.html
评论列表(0条)