Skip to content
Discussion options

You must be logged in to vote

@ArthurTimofey I just had the same issue and it turned out to be in how I was using my environment variables. Instead of declaring it like this PB_URL="https://somepocketbaseurl", you would want to use VITE_PB_URL (more here).
And then in your src/hooks.server.ts:
event.locals.pb = new PocketBase(import.meta.env.VITE_PB_URL);
This worked for me, I hope it helps you :).

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@ArthurTimofey
Comment options

@eltigerchino
Comment options

Answer selected by ArthurTimofey
Comment options

You must be logged in to vote
1 reply
@stijnbakk
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants