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

Local setup instructions do not seem to work #1399

Closed
C-Loftus opened this issue Feb 7, 2024 · 2 comments
Closed

Local setup instructions do not seem to work #1399

C-Loftus opened this issue Feb 7, 2024 · 2 comments

Comments

@C-Loftus
Copy link

C-Loftus commented Feb 7, 2024

I am having an issue using the local setup after clicking 'Start chatting'

I have supabase running and can access the backend GUI. I ran the SQL setup in the instructions. I then ran next build and then npm run chat to start supabase, run db-types, and run dev. This did not generate any errors.

However, once the UI is running on localhost, if I click the button to 'Start Chatting' I get a runtime error. I have one test user in the database, but no other data. (I was able to click the button to create a user for the first time, but only got failures after that was reigstered)

OS: WSL2 with Ubuntu

Unhandled Runtime Error
Error: JSON object requested, multiple (or no) rows returned

Source
app\[locale]\login\page.tsx (45:12) @ Login

  43 |
  44 | if (!homeWorkspace) {
> 45 |   throw new Error(error.message)
     |        ^
  46 | }
  47 |
  48 | return redirect(`/${homeWorkspace.id}/chat`)
Call Stack
process.processTicksAndRejections
node:internal/process/task_queues (95:5)
Hide collapsed frames
@yesbhautik
Copy link
Contributor

I have done as below & it works...

1 cloned repo
2 npm i
3 npm install supabase --save-dev
4 nano .env OR set values to env variable if you are using any panel for more security with [SUPABASE_ACCESS_TOKEN (supabase account api), NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, EMAIL_WHITELIST]
5 modified "supabase/migrations/20240108234540_setup.sql"
6 supabase link --project-ref [no need to enter any password]
7 supabase db push [need to enter password which you have set during database creation on supabase cloud]
8 npm run dev
-- DONE --

[if you are in any panel and hard to modify the code or unable to access the terminal enough permission then you can perfrom step 1 to 7 at any device, doesnt matter that device is local or online then mention repo URL in your panel just set env variable and you good to go smoothly]

@C-Loftus
Copy link
Author

C-Loftus commented Feb 7, 2024

Thanks for your message. I am not finding that works for me unfortunately. Just to clarify, the instructions say to install supabase with brew not npm. Not sure if there is a difference. I didn't find that to help.

Regardless, I can build the project and launch the supabase no issue, it just seems that something is wrong with the default database table given the fact that Error: JSON object requested, multiple (or no) rows returned

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

3 participants