Skip to content

HiveChat无法正常使用YugabyteDB和Supabase云数据库 #86

Description

@aaro-n

说明

我是将HiveChat部署在Fly.io上,用YugabyteDB无法连接,用Supabase时有以下错误提示


2025-08-31 13:29:34.855 | 2025/08/31 05:29:34 INFO SSH listening listen_address=[fdaa:29:b67e:a7b:466:c500:1d2c:2]:22 |  
-- | -- | --
  |   | 2025-08-31 13:29:34.596 | Machine created and started in 2.406s |  
  |   | 2025-08-31 13:29:34.534 | INFO [fly api proxy] listening at /.fly/api |  
  |   | 2025-08-31 13:29:34.525 | INFO Preparing to run: `docker-entrypoint.sh node server.js` as root |  
  |   | 2025-08-31 13:29:34.443 | INFO Starting init (commit: f6529c7)... |  
  |   | 2025-08-31 13:29:33.580 | 2025-08-31T05:29:33.580189920 [01K3Z9M9REE0TE5RNFTZ1KKW00:main] Listening on API socket ("/fc.sock"). |  
  |   | 2025-08-31 13:29:33.580 | 2025-08-31T05:29:33.579991317 [01K3Z9M9REE0TE5RNFTZ1KKW00:main] Running Firecracker v1.12.1 |  
  |   | 2025-08-31 13:29:33.100 | [  444.462072] reboot: Restarting system |  
  |   | 2025-08-31 13:29:33.099 | WARN could not unmount /rootfs: EINVAL: Invalid argument |  
  |   | 2025-08-31 13:29:33.098 | INFO Starting clean up. |  
  |   | 2025-08-31 13:29:33.083 | INFO Main child exited normally with code: 0 |  
  |   | 2025-08-31 13:29:32.961 | INFO Sending signal SIGINT to main child process w/ PID 628 |  
  |   | 2025-08-31 13:29:32.947 | Configuring firecracker |  
  |   | 2025-08-31 13:29:32.200 | Container image docker-hub-mirror.fly.io/hivenexus/hivechat@sha256:f67c113da5574fc3467e3ac1749196e68e26b11cdd055083e16cab922ee65d92 already prepared |  
  |   | 2025-08-31 13:29:32.200 | Pulling container image docker-hub-mirror.fly.io/hivenexus/hivechat@sha256:f67c113da5574fc3467e3ac1749196e68e26b11cdd055083e16cab922ee65d92 |  
  |   | 2025-08-31 13:22:25.260 | } |  
  |   | 2025-08-31 13:22:25.260 | digest: '383184506' |  
  |   | 2025-08-31 13:22:25.260 | routine: 'parserOpenTable', |  
  |   | 2025-08-31 13:22:25.260 | line: '1449', |  
  |   | 2025-08-31 13:22:25.260 | file: 'parse_relation.c', |  
  |   | 2025-08-31 13:22:25.260 | position: '56', |  
  |   | 2025-08-31 13:22:25.260 | code: '42P01', |  
  |   | 2025-08-31 13:22:25.260 | severity: 'ERROR', |  
  |   | 2025-08-31 13:22:25.260 | severity_local: 'ERROR', |  
  |   | 2025-08-31 13:22:25.260 | at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) { |  
  |   | 2025-08-31 13:22:25.260 | at TLSWrap.onStreamRead (node:internal/stream_base_commons:189:23) |  
  |   | 2025-08-31 13:22:25.260 | at Readable.push (node:internal/streams/readable:392:5) |  
  |   | 2025-08-31 13:22:25.260 | at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) |  
  |   | 2025-08-31 13:22:25.260 | at addChunk (node:internal/streams/readable:561:12) |  
  |   | 2025-08-31 13:22:25.260 | at TLSSocket.emit (node:events:518:28) |  
  |   | 2025-08-31 13:22:25.260 | at TLSSocket.eU (/app/.next/server/chunks/6106.js:39:3338) |  
  |   | 2025-08-31 13:22:25.260 | at /app/.next/server/chunks/6106.js:39:3333 |  
  |   | 2025-08-31 13:22:25.260 | at H (/app/.next/server/chunks/6106.js:39:2291) |  
  |   | 2025-08-31 13:22:25.260 | c: relation "app_settings" does not exist |  
  |   | 2025-08-31 13:22:10.349 | ✓ Ready in 112ms |  
  |   | 2025-08-31 13:22:10.349 | ✓ Ready in 112ms |  
  |   | 2025-08-31 13:22:10.250 | ✓ Starting... |  
  |   | 2025-08-31 13:22:10.250 | ✓ Starting... |  
  |   | 2025-08-31 13:22:10.250 | - Network:      http://0.0.0.0:3000 |  
  |   | 2025-08-31 13:22:10.250 | - Network:      http://0.0.0.0:3000 |  
  |   | 2025-08-31 13:22:10.249 | - Local:        http://localhost:3000 |  
  |   | 2025-08-31 13:22:10.249 | - Local:        http://localhost:3000

HiveChat无法正常使用YugabyteDB和Supbase云数据库,未在Neon测试。

使用vercell填充数据库

docker镜像无法在首次连接数据库时导入内容,我必须vercel将数据库URL输入进去,并部署,这样Fly.io就可以正常使用了,但也还是有问题:

  1. Neon 正常使用
  2. Supbase云数据库,使用IPV6无法连接数据库,使用IPV4有报错,Fly.io可以正常使用这个数据库,但模型哪里是空白的,以下是日志:
[13:58:30.292] Running build in Washington, D.C., USA (East) – iad1
[13:58:30.293] Build machine configuration: 2 cores, 8 GB
[13:58:30.322] Cloning github.com/aaro-n/2-hivechat (Branch: main, Commit: 605ab48)
[13:58:30.331] Skipping build cache, deployment was triggered without cache.
[13:58:30.873] Cloning completed: 551.000ms
[13:58:31.229] Running "vercel build"
[13:58:31.641] Vercel CLI 46.1.0
[13:58:32.019] Installing dependencies...
[13:58:36.415] npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
[13:58:38.372] npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
[13:58:40.599] npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
[13:58:40.600] npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
[13:58:40.738] npm warn deprecated @esbuild-kit/esm-loader@2.6.5: Merged into tsx: https://tsx.is
[13:58:40.912] npm warn deprecated @esbuild-kit/core-utils@3.3.2: Merged into tsx: https://tsx.is
[13:58:42.062] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[13:59:05.515] 
[13:59:05.516] added 974 packages in 33s
[13:59:05.517] 
[13:59:05.517] 314 packages are looking for funding
[13:59:05.517]   run `npm fund` for details
[13:59:05.570] Detected Next.js version: 14.2.25
[13:59:05.571] Running "next build && npm run initdb"
[13:59:06.207] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[13:59:06.208] This information is used to shape Next.js' roadmap and prioritize features.
[13:59:06.208] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[13:59:06.208] https://nextjs.org/telemetry
[13:59:06.208] 
[13:59:06.273]   ▲ Next.js 14.2.25
[13:59:06.274] 
[13:59:06.342]    Creating an optimized production build ...
[14:00:19.232] Browserslist: caniuse-lite is outdated. Please run:
[14:00:19.233]   npx update-browserslist-db@latest
[14:00:19.233]   Why you should do it regularly: https://github.com/browserslist/update-db#readme
[14:00:26.478]  ⚠ Compiled with warnings
[14:00:26.478] 
[14:00:26.478] ./node_modules/bcryptjs/dist/bcrypt.js
[14:00:26.479] A Node.js API is used (process.nextTick at line: 351) which is not supported in the Edge Runtime.
[14:00:26.479] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:00:26.479] 
[14:00:26.479] Import trace for requested module:
[14:00:26.479] ./node_modules/bcryptjs/dist/bcrypt.js
[14:00:26.479] ./app/utils/password.ts
[14:00:26.479] ./auth.ts
[14:00:26.479] 
[14:00:26.479] ./node_modules/bcryptjs/dist/bcrypt.js
[14:00:26.479] A Node.js API is used (setImmediate at line: 352) which is not supported in the Edge Runtime.
[14:00:26.479] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:00:26.479] 
[14:00:26.479] Import trace for requested module:
[14:00:26.479] ./node_modules/bcryptjs/dist/bcrypt.js
[14:00:26.479] ./app/utils/password.ts
[14:00:26.479] ./auth.ts
[14:00:26.479] 
[14:00:26.479] ./node_modules/bcryptjs/dist/bcrypt.js
[14:00:26.479] A Node.js API is used (setImmediate at line: 352) which is not supported in the Edge Runtime.
[14:00:26.480] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:00:26.480] 
[14:00:26.480] Import trace for requested module:
[14:00:26.480] ./node_modules/bcryptjs/dist/bcrypt.js
[14:00:26.480] ./app/utils/password.ts
[14:00:26.480] ./auth.ts
[14:00:26.480] 
[14:00:26.480] ./node_modules/bcryptjs/dist/bcrypt.js
[14:00:26.480] A Node.js API is used (process.nextTick at line: 352) which is not supported in the Edge Runtime.
[14:00:26.480] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:00:26.482] 
[14:00:26.482] Import trace for requested module:
[14:00:26.482] ./node_modules/bcryptjs/dist/bcrypt.js
[14:00:26.482] ./app/utils/password.ts
[14:00:26.482] ./auth.ts
[14:00:26.482] 
[14:00:26.482] ./node_modules/postgres/src/connection.js
[14:00:26.482] A Node.js module is loaded ('net' at line 1) which is not supported in the Edge Runtime.
[14:00:26.482] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[14:00:26.482] 
[14:00:26.483] Import trace for requested module:
[14:00:26.483] ./node_modules/postgres/src/connection.js
[14:00:26.483] ./node_modules/postgres/src/index.js
[14:00:26.483] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.484] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.484] ./app/db/index.ts
[14:00:26.484] ./auth.ts
[14:00:26.484] 
[14:00:26.484] ./node_modules/postgres/src/connection.js
[14:00:26.484] A Node.js module is loaded ('tls' at line 2) which is not supported in the Edge Runtime.
[14:00:26.489] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[14:00:26.489] 
[14:00:26.489] Import trace for requested module:
[14:00:26.489] ./node_modules/postgres/src/connection.js
[14:00:26.489] ./node_modules/postgres/src/index.js
[14:00:26.489] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.489] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.489] ./app/db/index.ts
[14:00:26.489] ./auth.ts
[14:00:26.490] 
[14:00:26.490] ./node_modules/postgres/src/connection.js
[14:00:26.490] A Node.js module is loaded ('crypto' at line 3) which is not supported in the Edge Runtime.
[14:00:26.490] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[14:00:26.490] 
[14:00:26.490] Import trace for requested module:
[14:00:26.491] ./node_modules/postgres/src/connection.js
[14:00:26.491] ./node_modules/postgres/src/index.js
[14:00:26.491] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.491] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.491] ./app/db/index.ts
[14:00:26.491] ./auth.ts
[14:00:26.491] 
[14:00:26.491] ./node_modules/postgres/src/connection.js
[14:00:26.491] A Node.js module is loaded ('stream' at line 4) which is not supported in the Edge Runtime.
[14:00:26.491] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[14:00:26.491] 
[14:00:26.491] Import trace for requested module:
[14:00:26.491] ./node_modules/postgres/src/connection.js
[14:00:26.491] ./node_modules/postgres/src/index.js
[14:00:26.491] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.491] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.491] ./app/db/index.ts
[14:00:26.491] ./auth.ts
[14:00:26.491] 
[14:00:26.491] ./node_modules/postgres/src/connection.js
[14:00:26.491] A Node.js module is loaded ('perf_hooks' at line 5) which is not supported in the Edge Runtime.
[14:00:26.492] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[14:00:26.492] 
[14:00:26.492] Import trace for requested module:
[14:00:26.492] ./node_modules/postgres/src/connection.js
[14:00:26.492] ./node_modules/postgres/src/index.js
[14:00:26.492] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.492] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.492] ./app/db/index.ts
[14:00:26.492] ./auth.ts
[14:00:26.492] 
[14:00:26.492] ./node_modules/postgres/src/connection.js
[14:00:26.492] A Node.js API is used (setImmediate at line: 245) which is not supported in the Edge Runtime.
[14:00:26.495] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:00:26.495] 
[14:00:26.495] Import trace for requested module:
[14:00:26.495] ./node_modules/postgres/src/connection.js
[14:00:26.495] ./node_modules/postgres/src/index.js
[14:00:26.495] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.495] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.495] ./app/db/index.ts
[14:00:26.495] ./auth.ts
[14:00:26.495] 
[14:00:26.495] ./node_modules/postgres/src/connection.js
[14:00:26.495] A Node.js API is used (clearImmediate at line: 251) which is not supported in the Edge Runtime.
[14:00:26.495] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:00:26.495] 
[14:00:26.495] Import trace for requested module:
[14:00:26.495] ./node_modules/postgres/src/connection.js
[14:00:26.495] ./node_modules/postgres/src/index.js
[14:00:26.495] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.495] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.496] ./app/db/index.ts
[14:00:26.496] ./auth.ts
[14:00:26.496] 
[14:00:26.496] ./node_modules/postgres/src/connection.js
[14:00:26.496] A Node.js API is used (clearImmediate at line: 412) which is not supported in the Edge Runtime.
[14:00:26.496] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:00:26.496] 
[14:00:26.496] Import trace for requested module:
[14:00:26.496] ./node_modules/postgres/src/connection.js
[14:00:26.496] ./node_modules/postgres/src/index.js
[14:00:26.496] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.496] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.496] ./app/db/index.ts
[14:00:26.496] ./auth.ts
[14:00:26.496] 
[14:00:26.496] ./node_modules/postgres/src/connection.js
[14:00:26.496] A Node.js API is used (clearImmediate at line: 425) which is not supported in the Edge Runtime.
[14:00:26.496] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:00:26.496] 
[14:00:26.496] Import trace for requested module:
[14:00:26.496] ./node_modules/postgres/src/connection.js
[14:00:26.496] ./node_modules/postgres/src/index.js
[14:00:26.496] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.496] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.497] ./app/db/index.ts
[14:00:26.497] ./auth.ts
[14:00:26.497] 
[14:00:26.497] ./node_modules/postgres/src/index.js
[14:00:26.497] A Node.js module is loaded ('os' at line 1) which is not supported in the Edge Runtime.
[14:00:26.498] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[14:00:26.498] 
[14:00:26.498] Import trace for requested module:
[14:00:26.498] ./node_modules/postgres/src/index.js
[14:00:26.498] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.498] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.498] ./app/db/index.ts
[14:00:26.498] ./auth.ts
[14:00:26.498] 
[14:00:26.498] ./node_modules/postgres/src/index.js
[14:00:26.498] A Node.js module is loaded ('fs' at line 2) which is not supported in the Edge Runtime.
[14:00:26.498] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[14:00:26.498] 
[14:00:26.498] Import trace for requested module:
[14:00:26.498] ./node_modules/postgres/src/index.js
[14:00:26.498] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.498] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.498] ./app/db/index.ts
[14:00:26.498] ./auth.ts
[14:00:26.498] 
[14:00:26.498] ./node_modules/postgres/src/large.js
[14:00:26.498] A Node.js module is loaded ('stream' at line 1) which is not supported in the Edge Runtime.
[14:00:26.498] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[14:00:26.498] 
[14:00:26.498] Import trace for requested module:
[14:00:26.499] ./node_modules/postgres/src/large.js
[14:00:26.499] ./node_modules/postgres/src/index.js
[14:00:26.499] ./node_modules/drizzle-orm/postgres-js/driver.js
[14:00:26.499] ./node_modules/drizzle-orm/postgres-js/index.js
[14:00:26.499] ./app/db/index.ts
[14:00:26.499] ./auth.ts
[14:00:26.499] 
[14:00:26.501]    Linting and checking validity of types ...
[14:00:45.966]    Collecting page data ...
[14:00:51.023]    Generating static pages (0/29) ...
[14:00:52.152]    Generating static pages (7/29) 
[14:00:52.718]    Generating static pages (14/29) 
[14:00:53.347]    Generating static pages (21/29) 
[14:00:54.473]  ✓ Generating static pages (29/29)
[14:00:54.971]    Finalizing page optimization ...
[14:00:54.972]    Collecting build traces ...
[14:01:09.298] 
[14:01:09.323] Route (app)                              Size     First Load JS
[14:01:09.324] ┌ ƒ /                                    148 B          87.5 kB
[14:01:09.324] ├ ƒ /_not-found                          880 B          88.2 kB
[14:01:09.324] ├ ƒ /admin                               313 B          87.7 kB
[14:01:09.324] ├ ƒ /admin/bot/[bot_id]                  3.9 kB          568 kB
[14:01:09.324] ├ ƒ /admin/bot/create                    3.83 kB         345 kB
[14:01:09.324] ├ ƒ /admin/bot/list                      1.79 kB         163 kB
[14:01:09.324] ├ ƒ /admin/default-models                11.3 kB         238 kB
[14:01:09.324] ├ ƒ /admin/llm                           440 B           104 kB
[14:01:09.324] ├ ƒ /admin/llm/[provider]                9.88 kB         423 kB
[14:01:09.324] ├ ƒ /admin/mcp                           2.8 kB          254 kB
[14:01:09.324] ├ ƒ /admin/search                        16.9 kB         270 kB
[14:01:09.324] ├ ƒ /admin/system                        8.3 kB          258 kB
[14:01:09.324] ├ ƒ /admin/users/group                   6.94 kB         290 kB
[14:01:09.324] ├ ƒ /admin/users/list                    2.87 kB         280 kB
[14:01:09.324] ├ ƒ /api/auth/[...nextauth]              0 B                0 B
[14:01:09.324] ├ ƒ /api/completions                     0 B                0 B
[14:01:09.324] ├ ƒ /api/dingdingProxy                   0 B                0 B
[14:01:09.324] ├ ƒ /api/responses                       0 B                0 B
[14:01:09.324] ├ ƒ /api/wecomProxy                      0 B                0 B
[14:01:09.324] ├ ƒ /auth/error                          23.4 kB         154 kB
[14:01:09.324] ├ ƒ /chat                                11 kB           282 kB
[14:01:09.324] ├ ƒ /chat/[chat_id]                      28.7 kB         654 kB
[14:01:09.324] ├ ƒ /chat/bot/[bot_id]                   3.75 kB         568 kB
[14:01:09.324] ├ ƒ /chat/bot/create                     3.92 kB         345 kB
[14:01:09.324] ├ ƒ /chat/bot/discover                   2.72 kB         167 kB
[14:01:09.324] ├ ƒ /chat/settings/account               9.67 kB         283 kB
[14:01:09.324] ├ ƒ /chat/settings/system                3.04 kB         197 kB
[14:01:09.324] ├ ƒ /chat/thread/list                    5.78 kB         244 kB
[14:01:09.325] ├ ○ /icon.png                            0 B                0 B
[14:01:09.325] ├ ƒ /login                               8.25 kB         242 kB
[14:01:09.325] ├ ƒ /register                            5.52 kB         236 kB
[14:01:09.325] └ ƒ /setup                               8.5 kB          242 kB
[14:01:09.325] + First Load JS shared by all            87.4 kB
[14:01:09.325]   ├ chunks/2117-bd133f6728a3b18d.js      31.8 kB
[14:01:09.325]   ├ chunks/fd9d1056-c950d8fb32a91e75.js  53.6 kB
[14:01:09.325]   └ other shared chunks (total)          1.97 kB
[14:01:09.325] 
[14:01:09.325] 
[14:01:09.325] ƒ Middleware                             179 kB
[14:01:09.325] 
[14:01:09.325] ○  (Static)   prerendered as static content
[14:01:09.325] ƒ  (Dynamic)  server-rendered on demand
[14:01:09.325] 
[14:01:09.552] 
[14:01:09.552] > hivechat@0.1.0 initdb
[14:01:09.558] > npx drizzle-kit push --force &&  npm run db:seedProvider && npm run db:seedModel && npm run db:seedBot && npm run db:seedGroup
[14:01:09.558] 
[14:01:10.049] No config path provided, using default 'drizzle.config.ts'
[14:01:10.050] Reading config file '/vercel/path0/drizzle.config.ts'
[14:01:10.709] Using 'pg' driver for database querying
[14:01:10.910] [⣷] Pulling schema from database...
[14:01:11.029] �[2K�[1G[⣯] Pulling schema from database...
[14:01:11.157] �[2K�[1G[⣟] Pulling schema from database...
[14:01:11.285] �[2K�[1G[⡿] Pulling schema from database...
[14:01:11.414] �[2K�[1G[⢿] Pulling schema from database...
[14:01:11.542] �[2K�[1G[⣻] Pulling schema from database...
[14:01:11.670] �[2K�[1G[⣽] Pulling schema from database...
[14:01:11.798] �[2K�[1G[⣷] Pulling schema from database...
[14:01:11.926] �[2K�[1G[⣯] Pulling schema from database...
[14:01:12.054] �[2K�[1G[⣟] Pulling schema from database...
[14:01:12.182] �[2K�[1G[⡿] Pulling schema from database...
[14:01:12.310] �[2K�[1G[⢿] Pulling schema from database...
[14:01:12.439] �[2K�[1G[⣻] Pulling schema from database...
[14:01:12.567] �[2K�[1G[⣽] Pulling schema from database...
[14:01:12.585] �[2K�[1G[✓] Pulling schema from database...
[14:01:18.204] [✓] Changes applied
[14:01:18.352] 
[14:01:18.352] > hivechat@0.1.0 db:seedProvider
[14:01:18.353] > tsx ./app/db/providerSeed.ts
[14:01:18.353] 
[14:01:20.753] Error initializing providers: NeonDbError: Error connecting to database: fetch failed
[14:01:20.753]     at execute (/vercel/path0/node_modules/@neondatabase/serverless/index.js:1552:24)
[14:01:20.753]     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[14:01:20.754]     at async initializeProviders (/vercel/path0/app/db/providerSeed.ts:7:3) {
[14:01:20.754]   severity: undefined,
[14:01:20.754]   code: undefined,
[14:01:20.754]   detail: undefined,
[14:01:20.754]   hint: undefined,
[14:01:20.754]   position: undefined,
[14:01:20.754]   internalPosition: undefined,
[14:01:20.754]   internalQuery: undefined,
[14:01:20.754]   where: undefined,
[14:01:20.754]   schema: undefined,
[14:01:20.755]   table: undefined,
[14:01:20.756]   column: undefined,
[14:01:20.756]   dataType: undefined,
[14:01:20.756]   constraint: undefined,
[14:01:20.756]   file: undefined,
[14:01:20.756]   line: undefined,
[14:01:20.756]   routine: undefined,
[14:01:20.756]   sourceError: TypeError: fetch failed
[14:01:20.756]       at node:internal/deps/undici/undici:13510:13
[14:01:20.756]       at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[14:01:20.756]       at async execute (/vercel/path0/node_modules/@neondatabase/serverless/index.js:1551:15)
[14:01:20.756]       at async initializeProviders (/vercel/path0/app/db/providerSeed.ts:7:3) {
[14:01:20.756]     [cause]: Error: getaddrinfo ENOTFOUND api.pooler.supabase.com
[14:01:20.757]         at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:122:26) {
[14:01:20.757]       errno: -3008,
[14:01:20.757]       code: 'ENOTFOUND',
[14:01:20.757]       syscall: 'getaddrinfo',
[14:01:20.757]       hostname: 'api.pooler.supabase.com'
[14:01:20.757]     }
[14:01:20.757]   }
[14:01:20.757] }
[14:01:20.799] Error: Command "next build && npm run initdb" exited with 1

当使用IPV6 URL时如下:

[13:53:44.375] Running build in Washington, D.C., USA (East) – iad1
[13:53:44.376] Build machine configuration: 2 cores, 8 GB
[13:53:44.406] Cloning github.com/aaro-n/2-hivechat (Branch: main, Commit: 605ab48)
[13:53:44.415] Skipping build cache, deployment was triggered without cache.
[13:53:44.902] Cloning completed: 496.000ms
[13:53:45.268] Running "vercel build"
[13:53:45.669] Vercel CLI 46.1.0
[13:53:46.011] Installing dependencies...
[13:53:50.506] npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
[13:53:52.086] npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
[13:53:53.976] npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
[13:53:54.009] npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
[13:53:54.184] npm warn deprecated @esbuild-kit/esm-loader@2.6.5: Merged into tsx: https://tsx.is
[13:53:54.249] npm warn deprecated @esbuild-kit/core-utils@3.3.2: Merged into tsx: https://tsx.is
[13:53:55.165] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[13:54:15.417] 
[13:54:15.418] added 974 packages in 29s
[13:54:15.418] 
[13:54:15.418] 314 packages are looking for funding
[13:54:15.419]   run `npm fund` for details
[13:54:15.463] Detected Next.js version: 14.2.25
[13:54:15.465] Running "next build && npm run initdb"
[13:54:16.022] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[13:54:16.023] This information is used to shape Next.js' roadmap and prioritize features.
[13:54:16.023] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[13:54:16.023] https://nextjs.org/telemetry
[13:54:16.023] 
[13:54:16.077]   ▲ Next.js 14.2.25
[13:54:16.078] 
[13:54:16.150]    Creating an optimized production build ...
[13:55:19.778] Browserslist: caniuse-lite is outdated. Please run:
[13:55:19.779]   npx update-browserslist-db@latest
[13:55:19.779]   Why you should do it regularly: https://github.com/browserslist/update-db#readme
[13:55:26.068]  ⚠ Compiled with warnings
[13:55:26.069] 
[13:55:26.069] ./node_modules/bcryptjs/dist/bcrypt.js
[13:55:26.069] A Node.js API is used (process.nextTick at line: 351) which is not supported in the Edge Runtime.
[13:55:26.069] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:55:26.069] 
[13:55:26.069] Import trace for requested module:
[13:55:26.069] ./node_modules/bcryptjs/dist/bcrypt.js
[13:55:26.069] ./app/utils/password.ts
[13:55:26.069] ./auth.ts
[13:55:26.069] 
[13:55:26.069] ./node_modules/bcryptjs/dist/bcrypt.js
[13:55:26.069] A Node.js API is used (setImmediate at line: 352) which is not supported in the Edge Runtime.
[13:55:26.069] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:55:26.069] 
[13:55:26.069] Import trace for requested module:
[13:55:26.070] ./node_modules/bcryptjs/dist/bcrypt.js
[13:55:26.070] ./app/utils/password.ts
[13:55:26.070] ./auth.ts
[13:55:26.070] 
[13:55:26.070] ./node_modules/bcryptjs/dist/bcrypt.js
[13:55:26.070] A Node.js API is used (setImmediate at line: 352) which is not supported in the Edge Runtime.
[13:55:26.070] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:55:26.070] 
[13:55:26.070] Import trace for requested module:
[13:55:26.070] ./node_modules/bcryptjs/dist/bcrypt.js
[13:55:26.070] ./app/utils/password.ts
[13:55:26.070] ./auth.ts
[13:55:26.070] 
[13:55:26.070] ./node_modules/bcryptjs/dist/bcrypt.js
[13:55:26.070] A Node.js API is used (process.nextTick at line: 352) which is not supported in the Edge Runtime.
[13:55:26.070] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:55:26.070] 
[13:55:26.070] Import trace for requested module:
[13:55:26.070] ./node_modules/bcryptjs/dist/bcrypt.js
[13:55:26.070] ./app/utils/password.ts
[13:55:26.070] ./auth.ts
[13:55:26.070] 
[13:55:26.070] ./node_modules/postgres/src/connection.js
[13:55:26.070] A Node.js module is loaded ('net' at line 1) which is not supported in the Edge Runtime.
[13:55:26.070] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:55:26.070] 
[13:55:26.071] Import trace for requested module:
[13:55:26.071] ./node_modules/postgres/src/connection.js
[13:55:26.071] ./node_modules/postgres/src/index.js
[13:55:26.071] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.071] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.071] ./app/db/index.ts
[13:55:26.071] ./auth.ts
[13:55:26.071] 
[13:55:26.071] ./node_modules/postgres/src/connection.js
[13:55:26.071] A Node.js module is loaded ('tls' at line 2) which is not supported in the Edge Runtime.
[13:55:26.071] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:55:26.075] 
[13:55:26.076] Import trace for requested module:
[13:55:26.076] ./node_modules/postgres/src/connection.js
[13:55:26.076] ./node_modules/postgres/src/index.js
[13:55:26.076] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.077] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.077] ./app/db/index.ts
[13:55:26.077] ./auth.ts
[13:55:26.077] 
[13:55:26.077] ./node_modules/postgres/src/connection.js
[13:55:26.078] A Node.js module is loaded ('crypto' at line 3) which is not supported in the Edge Runtime.
[13:55:26.078] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:55:26.078] 
[13:55:26.078] Import trace for requested module:
[13:55:26.078] ./node_modules/postgres/src/connection.js
[13:55:26.078] ./node_modules/postgres/src/index.js
[13:55:26.078] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.078] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.078] ./app/db/index.ts
[13:55:26.078] ./auth.ts
[13:55:26.078] 
[13:55:26.078] ./node_modules/postgres/src/connection.js
[13:55:26.079] A Node.js module is loaded ('stream' at line 4) which is not supported in the Edge Runtime.
[13:55:26.079] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:55:26.079] 
[13:55:26.079] Import trace for requested module:
[13:55:26.079] ./node_modules/postgres/src/connection.js
[13:55:26.079] ./node_modules/postgres/src/index.js
[13:55:26.079] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.080] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.080] ./app/db/index.ts
[13:55:26.081] ./auth.ts
[13:55:26.081] 
[13:55:26.081] ./node_modules/postgres/src/connection.js
[13:55:26.081] A Node.js module is loaded ('perf_hooks' at line 5) which is not supported in the Edge Runtime.
[13:55:26.081] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:55:26.081] 
[13:55:26.081] Import trace for requested module:
[13:55:26.081] ./node_modules/postgres/src/connection.js
[13:55:26.081] ./node_modules/postgres/src/index.js
[13:55:26.081] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.081] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.081] ./app/db/index.ts
[13:55:26.081] ./auth.ts
[13:55:26.081] 
[13:55:26.081] ./node_modules/postgres/src/connection.js
[13:55:26.081] A Node.js API is used (setImmediate at line: 245) which is not supported in the Edge Runtime.
[13:55:26.084] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:55:26.084] 
[13:55:26.084] Import trace for requested module:
[13:55:26.084] ./node_modules/postgres/src/connection.js
[13:55:26.084] ./node_modules/postgres/src/index.js
[13:55:26.084] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.084] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.084] ./app/db/index.ts
[13:55:26.084] ./auth.ts
[13:55:26.084] 
[13:55:26.084] ./node_modules/postgres/src/connection.js
[13:55:26.084] A Node.js API is used (clearImmediate at line: 251) which is not supported in the Edge Runtime.
[13:55:26.084] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:55:26.084] 
[13:55:26.084] Import trace for requested module:
[13:55:26.084] ./node_modules/postgres/src/connection.js
[13:55:26.084] ./node_modules/postgres/src/index.js
[13:55:26.084] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.084] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.084] ./app/db/index.ts
[13:55:26.084] ./auth.ts
[13:55:26.084] 
[13:55:26.084] ./node_modules/postgres/src/connection.js
[13:55:26.084] A Node.js API is used (clearImmediate at line: 412) which is not supported in the Edge Runtime.
[13:55:26.085] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:55:26.085] 
[13:55:26.085] Import trace for requested module:
[13:55:26.085] ./node_modules/postgres/src/connection.js
[13:55:26.085] ./node_modules/postgres/src/index.js
[13:55:26.085] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.085] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.085] ./app/db/index.ts
[13:55:26.085] ./auth.ts
[13:55:26.085] 
[13:55:26.085] ./node_modules/postgres/src/connection.js
[13:55:26.085] A Node.js API is used (clearImmediate at line: 425) which is not supported in the Edge Runtime.
[13:55:26.085] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:55:26.085] 
[13:55:26.085] Import trace for requested module:
[13:55:26.085] ./node_modules/postgres/src/connection.js
[13:55:26.085] ./node_modules/postgres/src/index.js
[13:55:26.085] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.085] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.085] ./app/db/index.ts
[13:55:26.085] ./auth.ts
[13:55:26.085] 
[13:55:26.085] ./node_modules/postgres/src/index.js
[13:55:26.085] A Node.js module is loaded ('os' at line 1) which is not supported in the Edge Runtime.
[13:55:26.085] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:55:26.085] 
[13:55:26.086] Import trace for requested module:
[13:55:26.086] ./node_modules/postgres/src/index.js
[13:55:26.086] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.086] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.086] ./app/db/index.ts
[13:55:26.086] ./auth.ts
[13:55:26.086] 
[13:55:26.086] ./node_modules/postgres/src/index.js
[13:55:26.086] A Node.js module is loaded ('fs' at line 2) which is not supported in the Edge Runtime.
[13:55:26.086] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:55:26.086] 
[13:55:26.086] Import trace for requested module:
[13:55:26.086] ./node_modules/postgres/src/index.js
[13:55:26.086] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.086] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.086] ./app/db/index.ts
[13:55:26.086] ./auth.ts
[13:55:26.086] 
[13:55:26.086] ./node_modules/postgres/src/large.js
[13:55:26.086] A Node.js module is loaded ('stream' at line 1) which is not supported in the Edge Runtime.
[13:55:26.086] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:55:26.086] 
[13:55:26.086] Import trace for requested module:
[13:55:26.086] ./node_modules/postgres/src/large.js
[13:55:26.086] ./node_modules/postgres/src/index.js
[13:55:26.086] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:55:26.087] ./node_modules/drizzle-orm/postgres-js/index.js
[13:55:26.087] ./app/db/index.ts
[13:55:26.087] ./auth.ts
[13:55:26.087] 
[13:55:26.089]    Linting and checking validity of types ...
[13:55:42.421]    Collecting page data ...
[13:55:46.491]    Generating static pages (0/29) ...
[13:55:47.366]    Generating static pages (7/29) 
[13:55:47.817]    Generating static pages (14/29) 
[13:55:48.333]    Generating static pages (21/29) 
[13:55:49.117]  ✓ Generating static pages (29/29)
[13:55:49.524]    Finalizing page optimization ...
[13:55:49.525]    Collecting build traces ...
[13:56:00.574] 
[13:56:00.596] Route (app)                              Size     First Load JS
[13:56:00.596] ┌ ƒ /                                    148 B          87.5 kB
[13:56:00.596] ├ ƒ /_not-found                          880 B          88.2 kB
[13:56:00.597] ├ ƒ /admin                               313 B          87.7 kB
[13:56:00.597] ├ ƒ /admin/bot/[bot_id]                  3.9 kB          568 kB
[13:56:00.597] ├ ƒ /admin/bot/create                    3.83 kB         345 kB
[13:56:00.597] ├ ƒ /admin/bot/list                      1.79 kB         163 kB
[13:56:00.597] ├ ƒ /admin/default-models                11.3 kB         238 kB
[13:56:00.597] ├ ƒ /admin/llm                           440 B           104 kB
[13:56:00.597] ├ ƒ /admin/llm/[provider]                9.88 kB         423 kB
[13:56:00.597] ├ ƒ /admin/mcp                           2.8 kB          254 kB
[13:56:00.598] ├ ƒ /admin/search                        16.9 kB         270 kB
[13:56:00.598] ├ ƒ /admin/system                        8.3 kB          258 kB
[13:56:00.598] ├ ƒ /admin/users/group                   6.94 kB         290 kB
[13:56:00.598] ├ ƒ /admin/users/list                    2.87 kB         280 kB
[13:56:00.598] ├ ƒ /api/auth/[...nextauth]              0 B                0 B
[13:56:00.598] ├ ƒ /api/completions                     0 B                0 B
[13:56:00.598] ├ ƒ /api/dingdingProxy                   0 B                0 B
[13:56:00.598] ├ ƒ /api/responses                       0 B                0 B
[13:56:00.598] ├ ƒ /api/wecomProxy                      0 B                0 B
[13:56:00.598] ├ ƒ /auth/error                          23.4 kB         154 kB
[13:56:00.598] ├ ƒ /chat                                11 kB           282 kB
[13:56:00.598] ├ ƒ /chat/[chat_id]                      28.7 kB         654 kB
[13:56:00.599] ├ ƒ /chat/bot/[bot_id]                   3.75 kB         568 kB
[13:56:00.599] ├ ƒ /chat/bot/create                     3.92 kB         345 kB
[13:56:00.599] ├ ƒ /chat/bot/discover                   2.72 kB         167 kB
[13:56:00.599] ├ ƒ /chat/settings/account               9.67 kB         283 kB
[13:56:00.599] ├ ƒ /chat/settings/system                3.04 kB         197 kB
[13:56:00.599] ├ ƒ /chat/thread/list                    5.78 kB         244 kB
[13:56:00.599] ├ ○ /icon.png                            0 B                0 B
[13:56:00.599] ├ ƒ /login                               8.25 kB         242 kB
[13:56:00.599] ├ ƒ /register                            5.52 kB         236 kB
[13:56:00.599] └ ƒ /setup                               8.5 kB          242 kB
[13:56:00.600] + First Load JS shared by all            87.4 kB
[13:56:00.600]   ├ chunks/2117-bd133f6728a3b18d.js      31.8 kB
[13:56:00.600]   ├ chunks/fd9d1056-c950d8fb32a91e75.js  53.6 kB
[13:56:00.600]   └ other shared chunks (total)          1.97 kB
[13:56:00.600] 
[13:56:00.600] 
[13:56:00.600] ƒ Middleware                             179 kB
[13:56:00.600] 
[13:56:00.600] ○  (Static)   prerendered as static content
[13:56:00.601] ƒ  (Dynamic)  server-rendered on demand
[13:56:00.601] 
[13:56:00.785] 
[13:56:00.785] > hivechat@0.1.0 initdb
[13:56:00.786] > npx drizzle-kit push --force &&  npm run db:seedProvider && npm run db:seedModel && npm run db:seedBot && npm run db:seedGroup
[13:56:00.786] 
[13:56:01.202] No config path provided, using default 'drizzle.config.ts'
[13:56:01.203] Reading config file '/vercel/path0/drizzle.config.ts'
[13:56:01.752] Using 'pg' driver for database querying
[13:56:01.928] [⣷] Pulling schema from database...
[13:56:01.958] Error: connect ENETUNREACH 2406:da14:271:9902:36b0:46ca:f98f:57a1:5432 - Local (:::0)
[13:56:01.959]     at /vercel/path0/node_modules/pg-pool/index.js:45:11
[13:56:01.960]     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[13:56:01.960]     at async Object.query (/vercel/path0/node_modules/drizzle-kit/bin.cjs:78355:26)
[13:56:01.960]     at async fromDatabase2 (/vercel/path0/node_modules/drizzle-kit/bin.cjs:19095:25) {
[13:56:01.960]   errno: -101,
[13:56:01.960]   code: 'ENETUNREACH',
[13:56:01.960]   syscall: 'connect',
[13:56:01.960]   address: '2406:da14:271:9902:36b0:46ca:f98f:57a1',
[13:56:01.960]   port: 5432
[13:56:01.960] }
[13:56:02.072] 
[13:56:02.073] > hivechat@0.1.0 db:seedProvider
[13:56:02.073] > tsx ./app/db/providerSeed.ts
[13:56:02.073] 
[13:56:04.276] Error initializing providers: NeonDbError: Error connecting to database: fetch failed
[13:56:04.276]     at execute (/vercel/path0/node_modules/@neondatabase/serverless/index.js:1552:24)
[13:56:04.276]     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[13:56:04.276]     at async initializeProviders (/vercel/path0/app/db/providerSeed.ts:7:3) {
[13:56:04.276]   severity: undefined,
[13:56:04.276]   code: undefined,
[13:56:04.276]   detail: undefined,
[13:56:04.276]   hint: undefined,
[13:56:04.276]   position: undefined,
[13:56:04.276]   internalPosition: undefined,
[13:56:04.277]   internalQuery: undefined,
[13:56:04.277]   where: undefined,
[13:56:04.277]   schema: undefined,
[13:56:04.277]   table: undefined,
[13:56:04.277]   column: undefined,
[13:56:04.277]   dataType: undefined,
[13:56:04.277]   constraint: undefined,
[13:56:04.277]   file: undefined,
[13:56:04.277]   line: undefined,
[13:56:04.277]   routine: undefined,
[13:56:04.277]   sourceError: TypeError: fetch failed
[13:56:04.277]       at node:internal/deps/undici/undici:13510:13
[13:56:04.277]       at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[13:56:04.277]       at async execute (/vercel/path0/node_modules/@neondatabase/serverless/index.js:1551:15)
[13:56:04.277]       at async initializeProviders (/vercel/path0/app/db/providerSeed.ts:7:3) {
[13:56:04.277]     [cause]: Error: getaddrinfo ENOTFOUND api.xknoohfevvhpmwptittw.supabase.co
[13:56:04.277]         at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:122:26) {
[13:56:04.277]       errno: -3008,
[13:56:04.277]       code: 'ENOTFOUND',
[13:56:04.277]       syscall: 'getaddrinfo',
[13:56:04.277]       hostname: 'api.xknoohfevvhpmwptittw.supabase.co'
[13:56:04.277]     }
[13:56:04.277]   }
[13:56:04.277] }
[13:56:04.307] Error: Command "next build && npm run initdb" exited with 1
  1. YugabyteDB无法使用
[13:46:30.634] Running build in Washington, D.C., USA (East) – iad1
[13:46:30.635] Build machine configuration: 2 cores, 8 GB
[13:46:30.651] Cloning github.com/aaro-n/2-hivechat (Branch: main, Commit: 605ab48)
[13:46:30.660] Skipping build cache, deployment was triggered without cache.
[13:46:31.150] Cloning completed: 499.000ms
[13:46:31.570] Running "vercel build"
[13:46:32.257] Vercel CLI 46.1.0
[13:46:32.619] Installing dependencies...
[13:46:36.560] npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
[13:46:38.318] npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
[13:46:40.595] npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
[13:46:40.679] npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
[13:46:40.745] npm warn deprecated @esbuild-kit/esm-loader@2.6.5: Merged into tsx: https://tsx.is
[13:46:40.777] npm warn deprecated @esbuild-kit/core-utils@3.3.2: Merged into tsx: https://tsx.is
[13:46:41.867] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[13:47:02.132] 
[13:47:02.133] added 974 packages in 29s
[13:47:02.133] 
[13:47:02.134] 314 packages are looking for funding
[13:47:02.134]   run `npm fund` for details
[13:47:02.184] Detected Next.js version: 14.2.25
[13:47:02.185] Running "next build && npm run initdb"
[13:47:02.761] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[13:47:02.761] This information is used to shape Next.js' roadmap and prioritize features.
[13:47:02.762] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[13:47:02.762] https://nextjs.org/telemetry
[13:47:02.762] 
[13:47:02.818]   ▲ Next.js 14.2.25
[13:47:02.818] 
[13:47:02.888]    Creating an optimized production build ...
[13:48:07.768] Browserslist: caniuse-lite is outdated. Please run:
[13:48:07.769]   npx update-browserslist-db@latest
[13:48:07.769]   Why you should do it regularly: https://github.com/browserslist/update-db#readme
[13:48:14.470]  ⚠ Compiled with warnings
[13:48:14.470] 
[13:48:14.470] ./node_modules/bcryptjs/dist/bcrypt.js
[13:48:14.470] A Node.js API is used (process.nextTick at line: 351) which is not supported in the Edge Runtime.
[13:48:14.471] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:48:14.471] 
[13:48:14.471] Import trace for requested module:
[13:48:14.471] ./node_modules/bcryptjs/dist/bcrypt.js
[13:48:14.471] ./app/utils/password.ts
[13:48:14.471] ./auth.ts
[13:48:14.471] 
[13:48:14.471] ./node_modules/bcryptjs/dist/bcrypt.js
[13:48:14.471] A Node.js API is used (setImmediate at line: 352) which is not supported in the Edge Runtime.
[13:48:14.471] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:48:14.471] 
[13:48:14.471] Import trace for requested module:
[13:48:14.471] ./node_modules/bcryptjs/dist/bcrypt.js
[13:48:14.471] ./app/utils/password.ts
[13:48:14.471] ./auth.ts
[13:48:14.471] 
[13:48:14.471] ./node_modules/bcryptjs/dist/bcrypt.js
[13:48:14.472] A Node.js API is used (setImmediate at line: 352) which is not supported in the Edge Runtime.
[13:48:14.472] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:48:14.472] 
[13:48:14.472] Import trace for requested module:
[13:48:14.472] ./node_modules/bcryptjs/dist/bcrypt.js
[13:48:14.472] ./app/utils/password.ts
[13:48:14.472] ./auth.ts
[13:48:14.472] 
[13:48:14.472] ./node_modules/bcryptjs/dist/bcrypt.js
[13:48:14.472] A Node.js API is used (process.nextTick at line: 352) which is not supported in the Edge Runtime.
[13:48:14.472] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:48:14.472] 
[13:48:14.472] Import trace for requested module:
[13:48:14.472] ./node_modules/bcryptjs/dist/bcrypt.js
[13:48:14.472] ./app/utils/password.ts
[13:48:14.472] ./auth.ts
[13:48:14.472] 
[13:48:14.472] ./node_modules/postgres/src/connection.js
[13:48:14.473] A Node.js module is loaded ('net' at line 1) which is not supported in the Edge Runtime.
[13:48:14.473] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:48:14.473] 
[13:48:14.473] Import trace for requested module:
[13:48:14.473] ./node_modules/postgres/src/connection.js
[13:48:14.473] ./node_modules/postgres/src/index.js
[13:48:14.473] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.473] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.473] ./app/db/index.ts
[13:48:14.473] ./auth.ts
[13:48:14.473] 
[13:48:14.473] ./node_modules/postgres/src/connection.js
[13:48:14.473] A Node.js module is loaded ('tls' at line 2) which is not supported in the Edge Runtime.
[13:48:14.473] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:48:14.473] 
[13:48:14.473] Import trace for requested module:
[13:48:14.474] ./node_modules/postgres/src/connection.js
[13:48:14.474] ./node_modules/postgres/src/index.js
[13:48:14.474] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.474] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.474] ./app/db/index.ts
[13:48:14.474] ./auth.ts
[13:48:14.474] 
[13:48:14.474] ./node_modules/postgres/src/connection.js
[13:48:14.474] A Node.js module is loaded ('crypto' at line 3) which is not supported in the Edge Runtime.
[13:48:14.474] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:48:14.474] 
[13:48:14.474] Import trace for requested module:
[13:48:14.474] ./node_modules/postgres/src/connection.js
[13:48:14.474] ./node_modules/postgres/src/index.js
[13:48:14.474] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.474] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.474] ./app/db/index.ts
[13:48:14.475] ./auth.ts
[13:48:14.475] 
[13:48:14.475] ./node_modules/postgres/src/connection.js
[13:48:14.475] A Node.js module is loaded ('stream' at line 4) which is not supported in the Edge Runtime.
[13:48:14.475] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:48:14.475] 
[13:48:14.475] Import trace for requested module:
[13:48:14.475] ./node_modules/postgres/src/connection.js
[13:48:14.475] ./node_modules/postgres/src/index.js
[13:48:14.475] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.475] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.475] ./app/db/index.ts
[13:48:14.475] ./auth.ts
[13:48:14.475] 
[13:48:14.475] ./node_modules/postgres/src/connection.js
[13:48:14.475] A Node.js module is loaded ('perf_hooks' at line 5) which is not supported in the Edge Runtime.
[13:48:14.475] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:48:14.475] 
[13:48:14.476] Import trace for requested module:
[13:48:14.476] ./node_modules/postgres/src/connection.js
[13:48:14.476] ./node_modules/postgres/src/index.js
[13:48:14.476] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.476] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.476] ./app/db/index.ts
[13:48:14.476] ./auth.ts
[13:48:14.476] 
[13:48:14.476] ./node_modules/postgres/src/connection.js
[13:48:14.476] A Node.js API is used (setImmediate at line: 245) which is not supported in the Edge Runtime.
[13:48:14.476] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:48:14.476] 
[13:48:14.476] Import trace for requested module:
[13:48:14.476] ./node_modules/postgres/src/connection.js
[13:48:14.476] ./node_modules/postgres/src/index.js
[13:48:14.476] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.476] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.477] ./app/db/index.ts
[13:48:14.477] ./auth.ts
[13:48:14.483] 
[13:48:14.483] ./node_modules/postgres/src/connection.js
[13:48:14.483] A Node.js API is used (clearImmediate at line: 251) which is not supported in the Edge Runtime.
[13:48:14.483] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:48:14.483] 
[13:48:14.483] Import trace for requested module:
[13:48:14.483] ./node_modules/postgres/src/connection.js
[13:48:14.483] ./node_modules/postgres/src/index.js
[13:48:14.483] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.483] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.483] ./app/db/index.ts
[13:48:14.483] ./auth.ts
[13:48:14.483] 
[13:48:14.483] ./node_modules/postgres/src/connection.js
[13:48:14.483] A Node.js API is used (clearImmediate at line: 412) which is not supported in the Edge Runtime.
[13:48:14.483] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:48:14.483] 
[13:48:14.483] Import trace for requested module:
[13:48:14.483] ./node_modules/postgres/src/connection.js
[13:48:14.483] ./node_modules/postgres/src/index.js
[13:48:14.484] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.484] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.484] ./app/db/index.ts
[13:48:14.484] ./auth.ts
[13:48:14.484] 
[13:48:14.484] ./node_modules/postgres/src/connection.js
[13:48:14.484] A Node.js API is used (clearImmediate at line: 425) which is not supported in the Edge Runtime.
[13:48:14.484] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[13:48:14.484] 
[13:48:14.484] Import trace for requested module:
[13:48:14.484] ./node_modules/postgres/src/connection.js
[13:48:14.484] ./node_modules/postgres/src/index.js
[13:48:14.484] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.484] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.484] ./app/db/index.ts
[13:48:14.484] ./auth.ts
[13:48:14.484] 
[13:48:14.484] ./node_modules/postgres/src/index.js
[13:48:14.484] A Node.js module is loaded ('os' at line 1) which is not supported in the Edge Runtime.
[13:48:14.484] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:48:14.484] 
[13:48:14.484] Import trace for requested module:
[13:48:14.485] ./node_modules/postgres/src/index.js
[13:48:14.485] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.485] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.485] ./app/db/index.ts
[13:48:14.485] ./auth.ts
[13:48:14.485] 
[13:48:14.485] ./node_modules/postgres/src/index.js
[13:48:14.485] A Node.js module is loaded ('fs' at line 2) which is not supported in the Edge Runtime.
[13:48:14.485] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:48:14.485] 
[13:48:14.486] Import trace for requested module:
[13:48:14.486] ./node_modules/postgres/src/index.js
[13:48:14.486] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.486] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.486] ./app/db/index.ts
[13:48:14.486] ./auth.ts
[13:48:14.486] 
[13:48:14.486] ./node_modules/postgres/src/large.js
[13:48:14.486] A Node.js module is loaded ('stream' at line 1) which is not supported in the Edge Runtime.
[13:48:14.486] Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
[13:48:14.486] 
[13:48:14.486] Import trace for requested module:
[13:48:14.486] ./node_modules/postgres/src/large.js
[13:48:14.486] ./node_modules/postgres/src/index.js
[13:48:14.486] ./node_modules/drizzle-orm/postgres-js/driver.js
[13:48:14.486] ./node_modules/drizzle-orm/postgres-js/index.js
[13:48:14.486] ./app/db/index.ts
[13:48:14.486] ./auth.ts
[13:48:14.486] 
[13:48:14.488]    Linting and checking validity of types ...
[13:48:32.215]    Collecting page data ...
[13:48:36.624]    Generating static pages (0/29) ...
[13:48:37.579]    Generating static pages (7/29) 
[13:48:38.093]    Generating static pages (14/29) 
[13:48:38.630]    Generating static pages (21/29) 
[13:48:39.619]  ✓ Generating static pages (29/29)
[13:48:40.004]    Finalizing page optimization ...
[13:48:40.004]    Collecting build traces ...
[13:48:52.216] 
[13:48:52.238] Route (app)                              Size     First Load JS
[13:48:52.238] ┌ ƒ /                                    148 B          87.5 kB
[13:48:52.238] ├ ƒ /_not-found                          880 B          88.2 kB
[13:48:52.238] ├ ƒ /admin                               313 B          87.7 kB
[13:48:52.238] ├ ƒ /admin/bot/[bot_id]                  3.9 kB          568 kB
[13:48:52.238] ├ ƒ /admin/bot/create                    3.83 kB         345 kB
[13:48:52.239] ├ ƒ /admin/bot/list                      1.79 kB         163 kB
[13:48:52.239] ├ ƒ /admin/default-models                11.3 kB         238 kB
[13:48:52.239] ├ ƒ /admin/llm                           440 B           104 kB
[13:48:52.239] ├ ƒ /admin/llm/[provider]                9.88 kB         423 kB
[13:48:52.239] ├ ƒ /admin/mcp                           2.8 kB          254 kB
[13:48:52.239] ├ ƒ /admin/search                        16.9 kB         270 kB
[13:48:52.239] ├ ƒ /admin/system                        8.3 kB          258 kB
[13:48:52.239] ├ ƒ /admin/users/group                   6.94 kB         290 kB
[13:48:52.239] ├ ƒ /admin/users/list                    2.87 kB         280 kB
[13:48:52.239] ├ ƒ /api/auth/[...nextauth]              0 B                0 B
[13:48:52.239] ├ ƒ /api/completions                     0 B                0 B
[13:48:52.239] ├ ƒ /api/dingdingProxy                   0 B                0 B
[13:48:52.239] ├ ƒ /api/responses                       0 B                0 B
[13:48:52.239] ├ ƒ /api/wecomProxy                      0 B                0 B
[13:48:52.239] ├ ƒ /auth/error                          23.4 kB         154 kB
[13:48:52.239] ├ ƒ /chat                                11 kB           282 kB
[13:48:52.239] ├ ƒ /chat/[chat_id]                      28.7 kB         654 kB
[13:48:52.239] ├ ƒ /chat/bot/[bot_id]                   3.75 kB         568 kB
[13:48:52.239] ├ ƒ /chat/bot/create                     3.92 kB         345 kB
[13:48:52.239] ├ ƒ /chat/bot/discover                   2.72 kB         167 kB
[13:48:52.239] ├ ƒ /chat/settings/account               9.67 kB         283 kB
[13:48:52.239] ├ ƒ /chat/settings/system                3.04 kB         197 kB
[13:48:52.239] ├ ƒ /chat/thread/list                    5.78 kB         244 kB
[13:48:52.239] ├ ○ /icon.png                            0 B                0 B
[13:48:52.239] ├ ƒ /login                               8.25 kB         242 kB
[13:48:52.239] ├ ƒ /register                            5.52 kB         236 kB
[13:48:52.239] └ ƒ /setup                               8.5 kB          242 kB
[13:48:52.239] + First Load JS shared by all            87.4 kB
[13:48:52.239]   ├ chunks/2117-bd133f6728a3b18d.js      31.8 kB
[13:48:52.239]   ├ chunks/fd9d1056-c950d8fb32a91e75.js  53.6 kB
[13:48:52.240]   └ other shared chunks (total)          1.97 kB
[13:48:52.240] 
[13:48:52.240] 
[13:48:52.240] ƒ Middleware                             179 kB
[13:48:52.241] 
[13:48:52.241] ○  (Static)   prerendered as static content
[13:48:52.241] ƒ  (Dynamic)  server-rendered on demand
[13:48:52.241] 
[13:48:52.435] 
[13:48:52.435] > hivechat@0.1.0 initdb
[13:48:52.435] > npx drizzle-kit push --force &&  npm run db:seedProvider && npm run db:seedModel && npm run db:seedBot && npm run db:seedGroup
[13:48:52.435] 
[13:48:52.863] No config path provided, using default 'drizzle.config.ts'
[13:48:52.864] Reading config file '/vercel/path0/drizzle.config.ts'
[13:48:53.427] Using 'pg' driver for database querying
[13:48:53.611] [⣷] Pulling schema from database...
[13:48:53.733] �[2K�[1G[⣯] Pulling schema from database...
[13:48:53.861] �[2K�[1G[⣟] Pulling schema from database...
[13:48:53.989] �[2K�[1G[⡿] Pulling schema from database...
[13:48:54.111] Error: self-signed certificate in certificate chain
[13:48:54.112]     at /vercel/path0/node_modules/pg-pool/index.js:45:11
[13:48:54.112]     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[13:48:54.113]     at async Object.query (/vercel/path0/node_modules/drizzle-kit/bin.cjs:78355:26)
[13:48:54.113]     at async fromDatabase2 (/vercel/path0/node_modules/drizzle-kit/bin.cjs:19095:25) {
[13:48:54.113]   code: 'SELF_SIGNED_CERT_IN_CHAIN'
[13:48:54.113] }
[13:48:54.231] 
[13:48:54.231] > hivechat@0.1.0 db:seedProvider
[13:48:54.231] > tsx ./app/db/providerSeed.ts
[13:48:54.231] 
[13:48:56.419] Error initializing providers: NeonDbError: Error connecting to database: fetch failed
[13:48:56.420]     at execute (/vercel/path0/node_modules/@neondatabase/serverless/index.js:1552:24)
[13:48:56.420]     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[13:48:56.421]     at async initializeProviders (/vercel/path0/app/db/providerSeed.ts:7:3) {
[13:48:56.421]   severity: undefined,
[13:48:56.421]   code: undefined,
[13:48:56.421]   detail: undefined,
[13:48:56.421]   hint: undefined,
[13:48:56.421]   position: undefined,
[13:48:56.421]   internalPosition: undefined,
[13:48:56.421]   internalQuery: undefined,
[13:48:56.421]   where: undefined,
[13:48:56.421]   schema: undefined,
[13:48:56.421]   table: undefined,
[13:48:56.421]   column: undefined,
[13:48:56.421]   dataType: undefined,
[13:48:56.421]   constraint: undefined,
[13:48:56.421]   file: undefined,
[13:48:56.421]   line: undefined,
[13:48:56.421]   routine: undefined,
[13:48:56.421]   sourceError: TypeError: fetch failed
[13:48:56.421]       at node:internal/deps/undici/undici:13510:13
[13:48:56.421]       at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[13:48:56.422]       at async execute (/vercel/path0/node_modules/@neondatabase/serverless/index.js:1551:15)
[13:48:56.422]       at async initializeProviders (/vercel/path0/app/db/providerSeed.ts:7:3) {
[13:48:56.422]     [cause]: Error: getaddrinfo ENOTFOUND api.3e3ecdc6-7aa0-4e1c-8358-7f80a53bb1dd.aws.yugabyte.cloud
[13:48:56.422]         at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:122:26) {
[13:48:56.422]       errno: -3008,
[13:48:56.422]       code: 'ENOTFOUND',
[13:48:56.422]       syscall: 'getaddrinfo',
[13:48:56.422]       hostname: 'api.3e3ecdc6-7aa0-4e1c-8358-7f80a53bb1dd.aws.yugabyte.cloud'
[13:48:56.422]     }
[13:48:56.422]   }
[13:48:56.422] }
[13:48:56.454] Error: Command "next build && npm run initdb" exited with 1

Activity

  1. aaro-n commented on Sep 10, 2025

    @aaro-n
    Author

    我自己又测试了下,可以使用YugabyteDB数据库,使用前需要本地创建Next.js运行环境,手动初始化数据库。

    1. Docker运行Next.js
      Dockerfile
    # 使用轻量的基础镜像
    FROM alpine:latest
    
    # 设置工作目录
    WORKDIR /home/www
    
    # 设置环境变量
    ENV FLYCTL_INSTALL="/root/.fly"
    ENV PATH="$FLYCTL_INSTALL/bin:$PATH"
    
    # 安装依赖项并清理缓存
    RUN apk update && \
        apk add --no-cache curl   git vim  wget nodejs npm postgresql-client && \
        rm -rf /var/cache/apk/*
    
    # 添加一个命令,使容器保持运行
    CMD ["tail", "-f", "/dev/null"]
    

    docker-compose.yml

    services:
      hivechat:
        build:
          context: .
        image: hivechat
        container_name: hivechat
        ports:
          - "18198:8080"
    
    1. 构建镜像并运行
      ····
      docker-compose build
      docker-compose up -d
      docker exec -it hivechat /bin/sh
      ····
    2. 按照文档创建本地运行版本
    3. 在.en文件中天际变量
      NODE_TLS_REJECT_UNAUTHORIZED=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions