© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
Shjba

SyntaxError Unexpected token 'export'

I trying to using @NativeBPM/auth-helpers with NextJs + Typescript, but I got this error, I can't resolve this. My config in below:

{
    "@supabase/auth-helpers-nextjs": "^0.5.1",
    "@supabase/auth-helpers-react": "0.3.1",
    "@supabase/supabase-js": "2.0.4",
    "next": "12.0.9",
}
{
    "@supabase/auth-helpers-nextjs": "^0.5.1",
    "@supabase/auth-helpers-react": "0.3.1",
    "@supabase/supabase-js": "2.0.4",
    "next": "12.0.9",
}


.../node_modules/next/server.js:1
export { NextRequest } from 'next/dist/server/web/spec-extension/request'

SyntaxError: Unexpected token 'export'
    at compileFunction (<anonymous>)
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1031:15)
    at Module._compile (node:internal/modules/cjs/loader:1065:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (.../node_modules/@supabase/auth-helpers-nextjs/dist/index.js:39:21)
.../node_modules/next/server.js:1
export { NextRequest } from 'next/dist/server/web/spec-extension/request'

SyntaxError: Unexpected token 'export'
    at compileFunction (<anonymous>)
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1031:15)
    at Module._compile (node:internal/modules/cjs/loader:1065:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (.../node_modules/@supabase/auth-helpers-nextjs/dist/index.js:39:21)
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

'supabaseauth-helpers-nextjs' gives SyntaxError Unexpected token 'export'
SupabaseSSupabase / help-and-questions
4y ago
Uncaught SyntaxError ambiguous indirect export createClient
SupabaseSSupabase / help-and-questions
4y ago
Export user token to other domain and login
SupabaseSSupabase / help-and-questions
4y ago
Unexpected token 'I', Invalid request body is not valid JSON
SupabaseSSupabase / help-and-questions
4y ago