apricote / nest-pg-boss

Use pg-boss in your NestJS app
MIT License
11 stars 6 forks source link

operator ||= is not supported in version 14 of node #39

Closed mmendivilg closed 4 months ago

mmendivilg commented 5 months ago

Node.js (v14.21.3) build error since the assignment operator ||= is not supported, fixing this line lets the build complete

Apr  7 02:14:54 ip-172-31-32-220 web: > node dist/main
Apr  7 02:14:57 ip-172-31-32-220 web: /var/app/current/node_modules/@apricote/nest-pg-boss/dist/pg-boss.module.js:41
Apr  7 02:14:57 ip-172-31-32-220 web: dynamicModule.exports ||= [];
Apr  7 02:14:57 ip-172-31-32-220 web: ^^^
Apr  7 02:14:57 ip-172-31-32-220 web: SyntaxError: Unexpected token '||='
apricote commented 4 months ago

Hey @mmendivilg,

Node 14 is End-Of-Life. This library targets ES2022, which is mostly supported in later versions of Node 16 and fully from Node 17.

I would recommend you to use a currently maintained version of Node: https://github.com/nodejs/Release/?tab=readme-ov-file#release-schedule