nuxt-supabase
nuxt-supabase copied to clipboard
TypeError: kit.addServerMiddleware is not a function.
Bug report
TypeError: kit.addServerMiddleware is not a function
Describe the bug
Clould'nt start nuxt dev server.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Create Nuxt 2 project with the nuxt-app with
? Programming language: TypeScript
? Package manager: Yarn
? UI framework: Vuetify.js
? Template engine: HTML
? Linting tools: ESLint, Prettier
? Testing framework: Jest
? Rendering mode: Single Page App
? Deployment target: Static (Static/Jamstack hosting)
? Development tools: jsconfig.json (Recommended for VS Code if you're not using typescript)
- Add this package to the project and add nuxt-supabase module to
nuxt.config.js
. - Run the
yarn run dev
- See error
Expected behavior
I expected to run the nuxt server corectlly.
Screenshots
System information
- OS: Ubuntu 20.04 LTS
- Version of nuxt-supabase: ^2.3.1
- Version of Node.js: v16.14.0
Additional context
I guess the problem happend from https://github.com/supabase-community/nuxt-supabase/blob/271db1b3216b7f1509ebd958553676f978bf0406/src/module.ts#L38-L41
Oops. I was doing written to a wrong section buildModules
.
I moved to a right section modules
, But it still not working.
For nuxt2 try version 1.0.8
npm install [email protected]
For nuxt2 try version 1.0.8
npm install [email protected]
This worked for me. Maybe docs just need to be updated?
Maybe the supabase version needs to be pinned before work for the v2 client is published
The version 1.0.8
is just injecting supabase client to Vue's DI container.
Therefore this module is not needed IMO.
And the @supabase/supabase-js
as dependency is too old, about 2 years ago.
When guys want to use supabase client in Nuxt 2 without SSR, Just make a Nuxt plugin for provide supabase client. I think that correct way to use latest supabase client.
In this issue I'm talking about this bug. I mean SSR features of v2 in this module.
v1.0.8 DOES NOT HAVE IMPLEMENTED SSR FEATURES. LOOKS LIKE WORKING, BUT IT HAS NOT WORKS.
Please forcus to the described bug.
I'll try to fix the bug myself to take more convenience.
I am getting the same issue, does anyone fixed it?
I got the same error. Does anyone managed to fix it ?
Switching to release 2.2.1 works fine on my side.