a16z-infra / ai-town

A MIT-licensed, deployable starter kit for building and customizing your own version of AI town - a virtual town where AI characters live, chat and socialize.
https://convex.dev/ai-town
MIT License
7.62k stars 705 forks source link

Unable to see things in the browser #192

Open lingxin08 opened 11 months ago

lingxin08 commented 11 months ago

Hi, Based on the log in my convex, I think the game is indeed running (see below image). However, in my localhost page, I just see a blank page. Any idea of possible reasons?

Screenshot 2023-11-21 at 5 32 28 AM

My browser page:

Screenshot 2023-11-21 at 5 33 14 AM

I think 1 possible reason might be, When I am setting up the keys in convex, I can't find VITE_CLERK_PUBLISHABLE_KEY, I can only found some other similar named keys in Clerk.

Screenshot 2023-11-21 at 5 26 52 AM

So in my variable set up in Convex, I just copy a publishable key from clerk, but named it as VITE_CLERK_PUBLISHABLE_KEY, like this:

Screenshot 2023-11-21 at 5 27 05 AM

Might that be the reason? If so, how to solve it? Thanks!!

DaRealOi commented 11 months ago

Hej you need to add this key to file ".env.local".

image

tigeroid commented 11 months ago

Hey, I have the same problem. My browser screen is not showing anything and the console log is showing this error.

Uncaught Error: @clerk/clerk-react: Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.

I have already added both the VITE_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY on .env.local. Please help?

francusli commented 10 months ago

Did you grab your VITE_PUBLIC_CLERK_PUBLISHABLE_KEY from the Next.js framework or the React framework?

I did from the React one and it worked, it didn't for the Next.js one.

gerotutu commented 8 months ago

I'm having the same issue. Could you get any solution?

Kerlinn commented 7 months ago

put the '.env.local' file into 'ai-town/src/' ,this is the front-end file library