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

How to run this repo locally? #1

Closed
ngtrphuong opened this issue Apr 17, 2024 · 6 comments
Closed

How to run this repo locally? #1

ngtrphuong opened this issue Apr 17, 2024 · 6 comments

Comments

@ngtrphuong
Copy link

Hi @iamjuney ,

This is the great idea and I'd like to experiment it in my local PC,
However, after several tries, the code is still unsucessful in term of running and playing around with it,

Do you have the detailed guideline on how to build and run this on both local and vercel env?

Many thanks,

@iamjuney
Copy link
Owner

iamjuney commented Apr 17, 2024

If all api keys are properly filled up then maybe instead of .env use .env.local for local dev.
(Edit) I've updated the READMe

@ngtrphuong
Copy link
Author

ngtrphuong commented Apr 17, 2024

Thakns for your prompt reply,
I tried following steps updated by you in README. However, it failed at step "pnpm run db:seed". Its error can be seen below:

`pnpm run db:seed

interview.ai@0.0.1 db:seed D:\interview.ai
node --import tsx --env-file .env.local ./src/lib/db/seed.ts

error: null value in column "slug" of relation "interviews" violates not-null constraint
at file:///D:/interview.ai/node_modules/.pnpm/@neondatabase+serverless@0.7.2/node_modules/@neondatabase/serverless/index.mjs:1339:74
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at insertInterviews (D:\interview.ai\src\lib\db\seed.ts:15:2)
at seed (D:\interview.ai\src\lib\db\seed.ts:10:2) {
length: 373,
severity: 'ERROR',
code: '23502',
detail: 'Failing row contains (a1b2c3d4-e5f6-7g8h-i9j0-k1l2m3n4o5p, null, Senior Python Developer, Advanced, 25, The Senior Python Developer is responsible for designing, develo..., 2024-04-17 10:13:59.745622).',
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: 'public',
table: 'interviews',
column: 'slug',
dataType: undefined,
constraint: undefined,
file: 'execMain.c',
line: '2003',
routine: 'ExecConstraints'
}
 ELIFECYCLE  Command failed with exit code 1. `

Not sure why the app cannot retrieve "slug" data from interviews.json file caused the "null" constraint error

@iamjuney
Copy link
Owner

@ngtrphuong Try now bro. I think i fixed it.

@ngtrphuong
Copy link
Author

Thanks @iamjuney . It passed the "pnpm run db:seed" step.
However, the other errors turn out while accessing its web page and mentioning that the issue with evaluating SSR (Server Side Rendering) error and ReferenceError - document is not defined - which should not be.
image
interview.ai.log

Further of error logs can be found in the embedded files,

I'm still troubleshooting with this now,

The curious question: have you tried running this project locally yet or just only deploying it on vercel?
Just want to know to follow up the same,

Many thanks in advance,

@iamjuney
Copy link
Owner

it also works locally in my case.

@ngtrphuong
Copy link
Author

Finally, I can make this works locally by fixing "document not found error" due to SSR via the work-around mentioned here - LottieFiles/svelte-lottie-player#7 (comment)

This is a great application,
Thanks a lot for your great contribution, @iamjuney

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