midway-practice
midway-practice copied to clipboard
启动时@midwayjs/bull报错
redis版本latest,应该是最新的版本8.0 @midwayjs/bull的版本是3.17.3
报错信息如下
start error: "length" is outside of buffer bounds
2024-09-20 15:18:59,830 INFO 81147 [midway:redis] server connecting redis://:***@127.0.0.1:6479
2024-09-20 15:18:59,844 INFO 81147 [midway:redis] client connect success
2024-09-20 15:18:59,973 INFO 81147 [midway:sequelize] client created: default
RangeError: "length" is outside of buffer bounds
at Buffer.proto.utf8Write (node:internal/buffer:1066:13)
at Packr.encodeUtf8 (/Users/ds/dev/service/midway/github/office-demo/midway-practice/node_modules/.pnpm/[email protected]/node_modules/msgpackr/pack.js:31:18)
at pack (/Users/ds/dev/service/midway/github/office-demo/midway-practice/node_modules/.pnpm/[email protected]/node_modules/msgpackr/pack.js:324:15)
at Packr.pack.encode (/Users/ds/dev/service/midway/github/office-demo/midway-practice/node_modules/.pnpm/[email protected]/node_modules/msgpackr/pack.js:129:6)
at Object.addJob (/Users/ds/dev/service/midway/github/office-demo/midway-practice/node_modules/.pnpm/[email protected]/node_modules/bull/lib/scripts.js:40:7)
at addJob (/Users/ds/dev/service/midway/github/office-demo/midway-practice/node_modules/.pnpm/[email protected]/node_modules/bull/lib/job.js:83:18)
at /Users/ds/dev/service/midway/github/office-demo/midway-practice/node_modules/.pnpm/[email protected]/node_modules/bull/lib/job.js:97:14
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at async BullFramework.runJob (/Users/ds/dev/service/midway/github/office-demo/midway-practice/node_modules/.pnpm/@[email protected]/node_modules/@midwayjs/bull/dist/framework.js:130:20)
at async BullFramework.run (/Users/ds/dev/service/midway/github/office-demo/midway-practice/node_modules/.pnpm/@[email protected]/node_modules/@midwayjs/bull/dist/framework.js:67:17) {
code: 'ERR_BUFFER_OUT_OF_BOUNDS'
}
[ Midway ] Auto reload. [change] configuration.ts
-
configuration.ts
文件中注释掉@midwayjs/bull相关的即可启动 -
或者固定@midwayjs/[email protected]也可以正常启动。也会有定时任务