Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuxt build broken when using nuxtjs/supabase #425

Open
ZanzibarNuclear opened this issue Oct 13, 2024 · 4 comments
Open

Nuxt build broken when using nuxtjs/supabase #425

ZanzibarNuclear opened this issue Oct 13, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ZanzibarNuclear
Copy link

Version

@nuxtjs/supabase: v1.4.1
nuxt: v3.13.2

Reproduction Link

Steps to reproduce

Install and use nuxtjs/supabase. Works fine in dev mode. Build with:

npm run build

Nuxt Build Error: [commonjs--resolver] Missing "./client" specifier in "@ nuxtjs/supabase" package

at e (node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:45979:25)
at n (node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:45979:627)
at o (node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:45979:1297)
at resolveExportsOrImports (node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:46600:18)
at resolveDeepImport (node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:46623:25)
at tryNodeResolve (node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:46388:16)
at Object.resolveId (node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:46138:19)
at node_modules/rollup/dist/es/shared/node-entry.js:20730:40
at async PluginDriver.hookFirstAndGetPlugin (node_modules/rollup/dist/es/shared/node-entry.js:20630:28)
at async resolveId (node_modules/rollup/dist/es/shared/node-entry.js:19234:26)
at async ModuleLoader.resolveId (node_modules/rollup/dist/es/shared/node-entry.js:19663:15)
at async Object.resolveId (node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:12833:10)
at async PluginDriver.hookFirstAndGetPlugin (node_modules/rollup/dist/es/shared/node-entry.js:20630:28)
at async resolveId (node_modules/rollup/dist/es/shared/node-entry.js:19234:26)
at async ModuleLoader.resolveId (node_modules/rollup/dist/es/shared/node-entry.js:19663:15)
at async node_modules/rollup/dist/es/shared/node-entry.js:19966:50

What is Expected?

What is actually happening?

When I try to build either locally or as part of Cloudflare deployment, I get the following error:

Nuxt Build Error: [commonjs--resolver] Missing "./client" specifier in "@ nuxtjs/supabase" package

'npm run dev' works fine, and I have no problems accessing Supabase from the SPA. I am using OAuth2.

nuxt.config.ts includes @ nuxtjs/supabase in the list of modules, and has this:

supabase: {
redirect: true,
redirectOptions: {
login: '/join',
callback: '/confirm-auth',
cookieRedirect: true,
exclude: ['/', '/join', '/confirm-auth'],
},
cookieName: 'won-token',
cookieOptions: {
maxAge: 60 * 60 * 8,
sameSite: 'lax',
secure: true
},
clientOptions: {
auth: {
flowType: 'pkce',
detectSessionInUrl: true,
persistSession: true,
autoRefreshToken: true
}
}
},

The build error happens even without the supabase config (with redirect: false).

I have tried deleting node_modules and package-lock.json, then rebuilding. Same problem.

Any other ideas?

@ZanzibarNuclear ZanzibarNuclear added the bug Something isn't working label Oct 13, 2024
@th1m0
Copy link
Contributor

th1m0 commented Oct 14, 2024

Could you please provide a reproduction repo? I'm not able to reproduce this right now.

@ZanzibarNuclear
Copy link
Author

ZanzibarNuclear commented Oct 14, 2024

Thanks for checking and responding.

Here's the repo and branch: https://github.com/ZanzibarNuclear/flux-client/tree/fill-gaps-to-alpha

@evertontst
Copy link

I have the same problem here. What's the solution?

@ZanzibarNuclear
Copy link
Author

It's a real blocker. My solution is to stop using Supabase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants