databerry
databerry copied to clipboard
How do you run the worker process?
When I type npx tsc --watch workers/datasource-loader.ts I get many errors:
`npx tsc --watch workers/datasource-loader.ts
[4:52:48 PM] Starting compilation in watch mode...
node_modules/@types/react-is/node_modules/@types/react/index.d.ts:3077:14 - error TS2300: Duplicate identifier 'LibraryManagedAttributes'.
3077 type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@types/react/index.d.ts:3135:14
3135 type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
~~~~~~~~~~~~~~~~~~~~~~~~
'LibraryManagedAttributes' was also declared here.
node_modules/@types/react-is/node_modules/@types/react/index.d.ts:3088:13 - error TS2717: Subsequent property declarations must have the same type. Property 'a' must be of type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>', but here has type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>'.
3088 a: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
~
node_modules/@types/react/index.d.ts:3146:13
3146 a: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
~
'a' was also declared here.
node_modules/@types/react-is/node_modules/@types/react/index.d.ts:3089:13 - error TS2717: Subsequent property declarations must have the same type. Property 'abbr' must be of type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>'.
3089 abbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
~~~~
node_modules/@types/react/index.d.ts:3147:13
3147 abbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
~~~~
'abbr' was also declared here.`
...
`workers/datasource-loader.ts:7:20 - error TS2307: Cannot find module '@app/utils/prisma-client' or its corresponding type declarations.
7 import prisma from '@app/utils/prisma-client';
~~~~~~~~~~~~~~~~~~~~~~~~~~
workers/datasource-loader.ts:8:32 - error TS2307: Cannot find module '@app/utils/task-load-datasource' or its corresponding type declarations.
8 import taskLoadDatasource from '@app/utils/task-load-datasource';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[4:59:50 PM] Found 184 errors. Watching for file changes.`
This is what I get when I type: npx tsx workers/datasource-loader.ts
BullMQ: DEPRECATION WARNING! Your redis options maxRetriesPerRequest must be null. On the next versions having this settings will throw an exception
BullMQ: DEPRECATION WARNING! Your redis options maxRetriesPerRequest must be null. On the next versions having this settings will throw an exception
(node:93790) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use `node --trace-warnings ...` to show where the warning was created)
Error: connect ECONNREFUSED 127.0.0.1:6379
at __node_internal_captureLargerStackTrace (node:internal/errors:464:5)
at __node_internal_exceptionWithHostPort (node:internal/errors:642:12)
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 6379
}