ali-sdk/ali-rds

#pool 语法不兼容问题

Closed this issue · 1 comments

使用egg-mysql 3.4引入 ali-rds 4.0.1的时候,egg在启动时会报错
` 2022-12-20 06:11:55,301 ERROR 78 nodejs.SyntaxError: [egg-core] load file: /app/node_modules/egg-mysql/agent.js, error: Invalid or unexpected token
#pool;
^

SyntaxError: Invalid or unexpected token
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)

pid: 78
hostname: 5b3715138241

/app/node_modules/ali-rds/lib/client.js:9
#pool;
^

SyntaxError: Invalid or unexpected token`
目前只能把egg-mysql版本降到3.4以下,引入ali-rds4.0以下的版本才正常

node 需要 >= 14.17.0