You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to migrate from next-auth v4 to new next-auth@beta. But when I'm trying to create the auth.ts file, it shows me an error.
Error message
[{
"resource": "/c:/Users/.../dashboard/auth.ts",
"owner": "typescript",
"code": "2349",
"severity": 8,
"message": "This expression is not callable.\n Type 'typeof import(\"c:/Users/.../dashboard/next-auth\")' has no call signatures.",
"source": "ts",
"startLineNumber": 3,
"startColumn": 52,
"endLineNumber": 3,
"endColumn": 60
}]
And here are the main three files of the authjs setup. I'm unable to configure or proceed because of that error.
(Imports to route and middleware from auth.ts is not '@/auth' because @ is set to src folder.)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I was trying to migrate from next-auth v4 to new next-auth@beta. But when I'm trying to create the auth.ts file, it shows me an error.
Error message
And here are the main three files of the authjs setup. I'm unable to configure or proceed because of that error.
(Imports to route and middleware from auth.ts is not '@/auth' because @ is set to src folder.)
root: auth.ts
src/middleware.ts
src/app/api/auth/[...nextauth]/route.ts
You can see these are just the basic configurations that shown in authjs official docs.
But I have no idea why I'm getting this error.
Beta Was this translation helpful? Give feedback.
All reactions