~/mi-gpt$ npm install mi-gpt
Environment updated. Reloading shell...
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'tsup@8.2.4',
npm WARN EBADENGINE required: { node: '>=18' },
npm WARN EBADENGINE current: { node: 'v16.18.1', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'tsx@4.17.0',
npm WARN EBADENGINE required: { node: '>=18.0.0' },
npm WARN EBADENGINE current: { node: 'v16.18.1', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'esbuild@0.23.1',
npm WARN EBADENGINE required: { node: '>=18' },
npm WARN EBADENGINE current: { node: 'v16.18.1', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'postcss-load-config@6.0.1',
npm WARN EBADENGINE required: { node: '>= 18' },
npm WARN EBADENGINE current: { node: 'v16.18.1', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'rollup@4.21.0',
npm WARN EBADENGINE required: { node: '>=18.0.0', npm: '>=8.0.0' },
npm WARN EBADENGINE current: { node: 'v16.18.1', npm: '8.19.2' }
npm WARN EBADENGINE }
added 193 packages, and audited 194 packages in 31s
29 packages are looking for funding
run `npm fund` for details
4 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
Environment updated. Reloading shell...
~/mi-gpt$ nvm install node
22 is already installed.
Now using node 22
Environment rebuilding in the background...
~/mi-gpt$ nvm use node
Nothing to do
Environment updated. Reloading shell...
~/mi-gpt$ npm audit fix --force
npm warn using --force Recommended protections disabled.
npm warn audit Updating tsup to 3.7.0, which is a SemVer major change.
added 19 packages, removed 41 packages, changed 3 packages, and audited 172 packages in 6s
22 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
(注:使用run.ts运行。
import config from "./.migpt.js";
import { MiGPT } from "./dist/index.cjs";
async function main() {
const client = MiGPT.create(config);
await client.start();
}
main();
)
开始运行!
--> npm install
> mi-gpt@4.1.0 postinstall
> npx -y prisma migrate dev --name hello
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "app.db" at "file:app.db"
SQLite database app.db created at file:app.db
Applying migration `20240227161545_init`
The following migration(s) have been applied:
migrations/
└─ 20240227161545_init/
└─ migration.sql
Your database is now in sync with your schema.
✔ Generated Prisma Client (v5.18.0) to ./node_modules/@prisma/client in 331ms
up to date, audited 172 packages in 5s
22 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
开始报错:
node:internal/modules/cjs/loader:1189
throw err;
^
Error: Cannot find module '/home/runner/mi-gpt/run'
at Module._resolveFilename (node:internal/modules/cjs/loader:1186:15)
at Module._load (node:internal/modules/cjs/loader:1012:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:12)
at node:internal/main/run_main_module:30:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v22.2.0
在Windows11上运行正常。
Replit的Linux版本:
~/mi-gpt$ uname -a
Linux 66a40a07bb67 6.5.0-1025-gcp #27~22.04.1-Ubuntu SMP Tue Jul 16 23:03:39 UTC 2024 x86_64 GNU/Linux
1.docker死活运行不了。失败。 2.尝试用node运行。 依赖安装过程:
(注:使用run.ts运行。
) 开始运行!
开始报错:
在Windows11上运行正常。 Replit的Linux版本:
省流:
Ubuntu 20.04