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

adding a blog feature - supabase access token #238

Open
MincePie opened this issue Aug 18, 2023 · 1 comment
Open

adding a blog feature - supabase access token #238

MincePie opened this issue Aug 18, 2023 · 1 comment

Comments

@MincePie
Copy link

MincePie commented Aug 18, 2023

I am trying to use this template to make an app. I can deploy your code to vercel.

I tried to add a blog feature (all access policy for now).

I can run it in dev mode.

I cannot run npm run generate-types. I get an error back that says:

2023/08/18 11:19:58 Access token not provided. Supply an access token by running supabase login or setting the SUPABASE_ACCESS_TOKEN environment variable.

I don't know what this means, but I did make a new JWT secret and added it to my env.local as SUPABASE_ACCESS_TOKEN (which I now have along with the 2 NEXT_PUBLIC tokens and the SUPABASE_SERVICE_ROLE_KEY. I don't know what any of these are doing. All of them are added to my vercel env variables file.

Is there a tutorial on how to use this repo? I'm stuck on step 1 and can't get any sense out of chat gpt on what to try next.

I tried amending the script in the package json from:

"generate-types": "npx supabase gen types typescript --project-id YOUR_PROJECT_ID --schema public > types_db.ts"

to :

"generate-types": "npx supabase gen types typescript --project-id theProjectIdStringInVercel --schema public > types_db.ts"

but when i try to run this script, i get a forbidden access error. how can i run this script?

thank you

@Starry-lord
Copy link

Starry-lord commented Sep 18, 2023

Try this to add this as a new script in your package.json file:

"supabase:login": "npx supabase login"

Then, if your using vscode, you should see a new npm script available. Run it and then run "generate-types" again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants