When running production build on my server I get these errors connected to the bullmq.
Seems to be connected to the "lib": ["dom"] setting in tsconfig, that TS thinks its using the DOM version of setTimeout. Tried to remove the dom setting but didn't remove the errors.
The server is running react with SSR and that's probably causing the issues.
Could you fix the types to support both dom and Node.js? and fix a declaration file for semver?
node_modules/bullmq/src/classes/job.ts:366:9 - error TS2322: Type 'number' is not assignable to type 'Timeout'.
366 timeout = setTimeout(
~~~~~~~
node_modules/bullmq/src/classes/redis-connection.ts:3:25 - error TS7016: Could not find a declaration file for module 'semver'. 'C:/Lu
dens/e-learning/elearning-api/node_modules/bullmq/node_modules/semver/semver.js' implicitly has an 'any' type.
Try `npm install @types/semver` if it exists or add a new declaration (.d.ts) file containing `declare module 'semver';`
3 import * as semver from 'semver';
~~~~~~~~
node_modules/bullmq/src/classes/timer-manager.ts:26:7 - error TS7006: Parameter 'timeoutId' implicitly has an 'any' type.
26 timeoutId => {
~~~~~~~~~
node_modules/bullmq/src/classes/timer-manager.ts:40:7 - error TS2322: Type 'number' is not assignable to type 'Timeout'.
40 timer,
~~~~~
node_modules/bullmq/src/classes/timer-manager.ts:12:7
12 timer: NodeJS.Timeout;
~~~~~
The expected type comes from property 'timer' which is declared here on type '{ name: string; timer: Timeout; }'
When running production build on my server I get these errors connected to the bullmq. Seems to be connected to the "lib": ["dom"] setting in tsconfig, that TS thinks its using the DOM version of setTimeout. Tried to remove the dom setting but didn't remove the errors.
The server is running react with SSR and that's probably causing the issues.
Could you fix the types to support both dom and Node.js? and fix a declaration file for semver?