chat-ollama
chat-ollama copied to clipboard
點擊 “Modify the current session configuration ” 按鈕後整個網頁沒有反應
點擊 “Modify the current session configuration ” 按鈕後整個網頁沒有反應 控制檯日誌:
ERROR (node:4593) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created)
Ollama: { host: 'http://127.0.0.1:11434', username: null, password: null } Ollama: { host: 'http://127.0.0.1:11434', username: null, password: null } Ollama: { host: 'http://127.0.0.1:11434', username: null, password: null } Ollama: { host: 'http://127.0.0.1:11434', username: null, password: null }
ERROR Error fetching instructions: Invalid prisma.instruction.findMany() invocation in /Users/bobo/workspace/github/chat-ollama/server/api/instruction/index.get.ts:6:1
3 4 const listInstructions = async (): Promise<Instruction[] | null> => { 5 try { → 6 return await prisma.instruction.findMany( error: Environment variable not found: DATABASE_URL. --> schema.prisma:3 | 2 | provider = "sqlite" 3 | url = env("DATABASE_URL") |
Validation Error Count: 1
Invalid prisma.instruction.findMany() invocation in server/api/instruction/index.get.ts:6:1
3 4 const listInstructions = async (): Promise<Instruction[] | null> => { 5 try { → 6 return await prisma.instruction.findMany( error: Environment variable not found: DATABASE_URL. --> schema.prisma:3 | 2 | provider = "sqlite" 3 | url = env("DATABASE_URL") |
Validation Error Count: 1 at In.handleRequestError (node_modules/@prisma/client/runtime/library.js:122:7154) at In.handleAndLogRequestError (node_modules/@prisma/client/runtime/library.js:122:6188) at In.request (node_modules/@prisma/client/runtime/library.js:122:5896) at async l (node_modules/@prisma/client/runtime/library.js:127:11167) at listInstructions (server/api/instruction/index.get.ts:6:1) at Object.handler (server/api/instruction/index.get.ts:18:1) at async node_modules/h3/dist/index.mjs:1962:19 at async Object.callAsync (node_modules/unctx/dist/index.mjs:72:16) at async Server.toNodeHandle (node_modules/h3/dist/index.mjs:2249:7)
这个似乎是 数据库没有成功初始化导致的
重新下载了源码,已经通过npm 重新安装了,sqlite该如何处理呢?
请问你有没有按照文档操作?
https://github.com/sugarforever/chat-ollama?tab=readme-ov-file#use-with-nuxt-3-development-server
點擊 “Modify the current session configuration ” 按鈕後整個網頁沒有反應 控制檯日誌:
ERROR (node:4593) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created)
Ollama: { host: 'http://127.0.0.1:11434', username: null, password: null } Ollama: { host: 'http://127.0.0.1:11434', username: null, password: null } Ollama: { host: 'http://127.0.0.1:11434', username: null, password: null } Ollama: { host: 'http://127.0.0.1:11434', username: null, password: null }
ERROR Error fetching instructions: Invalid prisma.instruction.findMany() invocation in /Users/bobo/workspace/github/chat-ollama/server/api/instruction/index.get.ts:6:1
3 4 const listInstructions = async (): Promise<Instruction[] | null> => { 5 try { → 6 return await prisma.instruction.findMany( error: Environment variable not found: DATABASE_URL. --> schema.prisma:3 | 2 | provider = "sqlite" 3 | url = env("DATABASE_URL") |
Validation Error Count: 1
Invalid prisma.instruction.findMany() invocation in server/api/instruction/index.get.ts:6:1
3 4 const listInstructions = async (): Promise<Instruction[] | null> => { 5 try { → 6 return await prisma.instruction.findMany( error: Environment variable not found: DATABASE_URL. --> schema.prisma:3 | 2 | provider = "sqlite" 3 | url = env("DATABASE_URL") |
Validation Error Count: 1 at In.handleRequestError (node_modules/@prisma/client/runtime/library.js:122:7154) at In.handleAndLogRequestError (node_modules/@prisma/client/runtime/library.js:122:6188) at In.request (node_modules/@prisma/client/runtime/library.js:122:5896) at async l (node_modules/@prisma/client/runtime/library.js:127:11167) at listInstructions (server/api/instruction/index.get.ts:6:1) at Object.handler (server/api/instruction/index.get.ts:18:1) at async node_modules/h3/dist/index.mjs:1962:19 at async Object.callAsync (node_modules/unctx/dist/index.mjs:72:16) at async Server.toNodeHandle (node_modules/h3/dist/index.mjs:2249:7)
看起来是运行的开发服务器吧。
请确认:
-
.env
或环境变量里是否有设置DATABASE_URL - 是否有创建SQLite数据库,比如运行pnpm run prisma-migrate
请问你有没有按照文档操作?
https://github.com/sugarforever/chat-ollama?tab=readme-ov-file#use-with-nuxt-3-development-server
明白了,少了這一步。如果啓動時有關鍵項自檢日誌就好了