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

fix: 使API余额查询可用 #11

Closed
wants to merge 2 commits into from
Closed

fix: 使API余额查询可用 #11

wants to merge 2 commits into from

Conversation

LuckyWang6
Copy link
Contributor

image

Copy link
Member

@Kerwin1202 Kerwin1202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一些问题

service/src/chatgpt/index.ts Show resolved Hide resolved
service/src/chatgpt/index.ts Outdated Show resolved Hide resolved
service/src/chatgpt/index.ts Show resolved Hide resolved
@cmtomkan310
Copy link

大佬,刚刚docker部署了一下你的源,出问题

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

chatgpt-web-service@1.0.0 prod /app
esno ./build/index.js

/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9
return (connectionString.startsWith('mongodb://') ||
^

TypeError: Cannot read properties of undefined (reading 'startsWith')
at connectionStringHasValidScheme (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
at ConnectionString (/app/node_modules/.pnpm/mongodb-connection-string-url@2.6.0/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
at parseOptions (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/connection_string.js:204:17)
at MongoClient (/app/node_modules/.pnpm/mongodb@5.1.0/node_modules/mongodb/lib/mongo_client.js:46:50)
at __defProp (/app/build/index.js:9545:14)
at Object. (/app/build/index.js:10399:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.F (/app/node_modules/.pnpm/@esbuild-kit+cjs-loader@2.4.2/node_modules/@esbuild-kit/cjs-loader/dist/index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

@Kerwin1202
Copy link
Member

@cmtomkan310 代表没找到 环境变量 你看下跑的目录下是否有 .env 文件 原来是一个 .env.example 需要改内容 并重命名

@Jxells
Copy link

Jxells commented Apr 4, 2023

SITE_TITLE 设置了不生效

@Kerwin1202
Copy link
Member

SITE_TITLE 设置了不生效

docker 可以的 自己编译是不行,因为是docker启动的时候替换的,自己编译 只是在发邮件 里的内容会变 html不会 这种自己编译就自己手动改 index.html 吧,我这目前侧重的是docker 跑的

@Jxells
Copy link

Jxells commented Apr 4, 2023

SITE_TITLE 设置了不生效

docker 可以的 自己编译是不行,因为是docker启动的时候替换的,自己编译 只是在发邮件 里的内容会变 html不会 这种自己编译就自己手动改 index.html 吧,我这目前侧重的是docker 跑的

ok 感谢

@Jxells
Copy link

Jxells commented Apr 4, 2023

是否考虑增加每个用户可以自定义设置自己的OPENAI_API_KEY或者OPENAI_ACCESS_TOKEN

@Kerwin1202
Copy link
Member

我合并了下但是发现冲突以及一些问题有点多, 所以直接自己抄你代码提交了。。

@Kerwin1202 Kerwin1202 closed this Apr 4, 2023
@Kerwin1202
Copy link
Member

是否考虑增加每个用户可以自定义设置自己的OPENAI_API_KEY或者OPENAI_ACCESS_TOKEN

可能会考虑 可以新开一个issue

Kerwin1202 pushed a commit that referenced this pull request Apr 4, 2023
@LuckyWang6
Copy link
Contributor Author

我合并了下但是发现冲突以及一些问题有点多, 所以直接自己抄你代码提交了。。

谢谢大佬🌚

@Kerwin1202
Copy link
Member

我合并了下但是发现冲突以及一些问题有点多, 所以直接自己抄你代码提交了。。

谢谢大佬🌚

应该是你fork https://github.com/Chanzhaoyu/chatgpt-web 这个改导致的,,你fork我的改就不会,,现在每次我合并分支要改一堆冲突。。

@jtwgo
Copy link

jtwgo commented Apr 5, 2023

为什么我部署完成后,注册了一个邮箱,通过邮箱的登录后,点击设置,只出现一个总览,没有其他配置的选项呢

@Kerwin1202
Copy link
Member

为什么我部署完成后,注册了一个邮箱,通过邮箱的登录后,点击设置,只出现一个总览,没有其他配置的选项呢

设置管理邮箱 环境变量 ROOT_USER 设置为第一个邮箱 才会显示

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

Successfully merging this pull request may close these issues.

5 participants