Closed jannikbuscha closed 3 years ago
Bug report - TS2339: Property '$supabase' does not exist on type 'x'. - nuxt-property-decorator
Description
Hello, I already reported this error on the last pull request, it's still the error I get when I use the whole thing with the functions from nuxt-property-decorator:
The funny thing is that everything works though:
Here the complete code:
Also added a ts-shim.d.ts and types
Are there perhaps other ways I can set this up?
System information
- OS: Windows
- Browser: Chromium
- Version of supabase-js: ^2.0.0
- Version of Node.js: v14.17.4.
- Version of nuxt-property-decorator: ^2.9.1
- IDE: PhpStorm 2021.2
If i use the asyncData method as given in the example i also get this error:
@scottrobertson I noticed that master is ahead of the latest release. The fix for this is actually there.
@jannikbuscha If you're still unsure about this, please install this module from github to try out the fix i.e. npm install supabase/nuxt-supabase
and see that the typescript error message dissapears.
@scottrobertson This could be solved by a patch release I believe
@scottrobertson I noticed that master is ahead of the latest release. The fix for this is actually there.
@jannikbuscha If you're still unsure about this, please install this module from github to try out the fix i.e.
npm install supabase/nuxt-supabase
and see that the typescript error message dissapears.@scottrobertson This could be solved by a patch release I believe
Hey
Sorry, out this week.
@kiwicopple could you perhaps make @sduduzog a contributor so they can do releases here and the other repo?
@sduduzog once you have access, just bump the version number in package.json and then go to the draft release in GitHub and publish it.
It's worth mentioning @jannikbuscha
If you want to get this working in the meantime before the release, add this snippet to your projects types file
import { SupabaseClient } from '@supabase/supabase-js';
declare module 'vue/types/vue' {
interface Vue {
$supabase: SupabaseClient;
}
or create a nuxt-supabase.d.ts
file to the root of your project and add the snippet there i.e.
and this should get you sorted until it's part of the release
Bug report - TS2339: Property '$supabase' does not exist on type 'x'. - nuxt-property-decorator
Description
Hello, I already reported this error on the last pull request, it's still the error I get when I use the whole thing with the functions from nuxt-property-decorator:
The funny thing is that everything works though:
Here the complete code:
Also added a ts-shim.d.ts and types
Are there perhaps other ways I can set this up?
System information