JohnZolton / snorkle

100% Local Document deep search with LLMs
25 stars 4 forks source link

Invalid environment variables: { DATABASE_URL: [ 'Required' ] } #1

Open fahdmirza opened 2 months ago

fahdmirza commented 2 months ago

Hi, I am getting following error:

`(sn) Ubuntu@0041-kci-prxmx10005:~/snorkle$ npm start

patense@0.1.0 start next start

▲ Next.js 14.2.7

regards,

fahdmirza commented 2 months ago

I was able to fix the above by putting in .env file. But now getting following error:

sn) Ubuntu@0041-kci-prxmx10005:~/snorkle$ npm start

patense@0.1.0 start next start

▲ Next.js 14.2.7

JohnZolton commented 2 months ago

Had the wrong npm command, updated it to 'npm run dev', thanks

fahdmirza commented 2 months ago

Hi, its running after using npm run dev, but when I try to create a new collection, it just hangs and gives following error in terminal:

` - Local: http://localhost:3000

The table main.Job does not exist in the current database. [TRPC] job.createJob took 425ms to execute ❌ tRPC failed on job.createJob: Invalid prisma.job.create() invocation:

The table main.Job does not exist in the current database. POST /api/trpc/job.createJob?batch=1 200 in 1804ms ○ Compiling /collections ... ✓ Compiled /collections in 732ms (1029 modules) ✓ Compiled /api/trpc/[trpc] in 190ms (569 modules) prisma:query SELECT 1 prisma:query SELECT main.Job.id, main.Job.createdAt, main.Job.updatedAt FROM main.Job WHERE 1=1 ORDER BY main.Job.createdAt ASC LIMIT ? OFFSET ? prisma:error Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. [TRPC] job.getAllJobs took 361ms to execute ❌ tRPC failed on job.getAllJobs: Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. GET /api/trpc/job.getAllJobs?batch=1&input=%7B%220%22%3A%7B%22json%22%3Anull%2C%22meta%22%3A%7B%22values%22%3A%5B%22undefined%22%5D%7D%7D%7D 200 in 730ms prisma:query SELECT main.Job.id, main.Job.createdAt, main.Job.updatedAt FROM main.Job WHERE 1=1 ORDER BY main.Job.createdAt ASC LIMIT ? OFFSET ? prisma:error Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. [TRPC] job.getAllJobs took 456ms to execute ❌ tRPC failed on job.getAllJobs: Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. GET /api/trpc/job.getAllJobs?batch=1&input=%7B%220%22%3A%7B%22json%22%3Anull%2C%22meta%22%3A%7B%22values%22%3A%5B%22undefined%22%5D%7D%7D%7D 200 in 490ms prisma:query SELECT main.Job.id, main.Job.createdAt, main.Job.updatedAt FROM main.Job WHERE 1=1 ORDER BY main.Job.createdAt ASC LIMIT ? OFFSET ? prisma:error Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. [TRPC] job.getAllJobs took 334ms to execute ❌ tRPC failed on job.getAllJobs: Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. GET /api/trpc/job.getAllJobs?batch=1&input=%7B%220%22%3A%7B%22json%22%3Anull%2C%22meta%22%3A%7B%22values%22%3A%5B%22undefined%22%5D%7D%7D%7D 200 in 366ms ⨯ TypeError: Promise.withResolvers is not a function at webpack_require (/home/Ubuntu/snorkle/.next/server/webpack-runtime.js:33:42) at eval (./src/app/new/page.tsx:15:67) at (ssr)/./src/app/new/page.tsx (/home/Ubuntu/snorkle/.next/server/app/new/page.js:173:1) at Object.webpack_require [as require] (/home/Ubuntu/snorkle/.next/server/webpack-runtime.js:33:42) at JSON.parse () digest: "2343748518" GET /new 500 in 318ms prisma:query SELECT main.Job.id, main.Job.createdAt, main.Job.updatedAt FROM main.Job WHERE 1=1 ORDER BY main.Job.createdAt ASC LIMIT ? OFFSET ? prisma:error Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. [TRPC] job.getAllJobs took 275ms to execute ❌ tRPC failed on job.getAllJobs: Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. GET /api/trpc/job.getAllJobs?batch=1&input=%7B%220%22%3A%7B%22json%22%3Anull%2C%22meta%22%3A%7B%22values%22%3A%5B%22undefined%22%5D%7D%7D%7D 200 in 309ms prisma:query SELECT main.Job.id, main.Job.createdAt, main.Job.updatedAt FROM main.Job WHERE 1=1 ORDER BY main.Job.createdAt ASC LIMIT ? OFFSET ? prisma:error Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. [TRPC] job.getAllJobs took 372ms to execute ❌ tRPC failed on job.getAllJobs: Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. GET /api/trpc/job.getAllJobs?batch=1&input=%7B%220%22%3A%7B%22json%22%3Anull%2C%22meta%22%3A%7B%22values%22%3A%5B%22undefined%22%5D%7D%7D%7D 200 in 403ms prisma:query SELECT main.Job.id, main.Job.createdAt, main.Job.updatedAt FROM main.Job WHERE 1=1 ORDER BY main.Job.createdAt ASC LIMIT ? OFFSET ? prisma:error Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. [TRPC] job.getAllJobs took 349ms to execute ❌ tRPC failed on job.getAllJobs: Invalid prisma.job.findMany() invocation:

The table main.Job does not exist in the current database. GET /api/trpc/job.getAllJobs?batch=1&input=%7B%220%22%3A%7B%22json%22%3Anull%2C%22meta%22%3A%7B%22values%22%3A%5B%22undefined%22%5D%7D%7D%7D 200 in 377ms GET / 200 in 108ms prisma:query SELECT 1 prisma:query SELECT main.Job.id, main.Job.createdAt, main.Job.updatedAt FROM main.Job WHERE 1=1 ORDER BY main.Job.createdAt ASC LIMIT ? OFFSET ? prisma:error Invalid prisma.job.findMany() invocation:

`

Could you please review the instructions in read me , as it seems that either software hasn't been tested / or fully ready, or read me doesnt has correct information. Thanks.

JohnZolton commented 2 months ago

updated, needed to run 'npm run db:push' to init the db

fahdmirza commented 2 months ago

Thanks, it works now. I did a full video on my channel on Snorkle:

https://youtu.be/abxKnUBo6rs?si=WGHBR-N-WxNxMkFU

regards, Fahd