Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run build fail #667

Open
peujs opened this issue Nov 13, 2024 · 0 comments
Open

npm run build fail #667

peujs opened this issue Nov 13, 2024 · 0 comments

Comments

@peujs
Copy link

peujs commented Nov 13, 2024

`> [email protected] build C:\xampp\htdocs\backend

tsc

src/tests/unit/User/AuthUserService.spec.ts:46:14 - error TS2571: Object is of type 'unknown'.

46 expect(err.statusCode).toBe(401);
~~~

src/tests/unit/User/AuthUserService.spec.ts:47:14 - error TS2571: Object is of type 'unknown'.

47 expect(err.message).toBe("ERR_INVALID_CREDENTIALS");
~~~

src/tests/unit/User/AuthUserService.spec.ts:65:14 - error TS2571: Object is of type 'unknown'.

65 expect(err.statusCode).toBe(401);
~~~

src/tests/unit/User/AuthUserService.spec.ts:66:14 - error TS2571: Object is of type 'unknown'.

66 expect(err.message).toBe("ERR_INVALID_CREDENTIALS");
~~~

src/tests/unit/User/CreateUserService.spec.ts:44:14 - error TS2571: Object is of type 'unknown'.

44 expect(err.statusCode).toBe(400);
~~~

src/controllers/ContactController.ts:74:24 - error TS2571: Object is of type 'unknown'.

74 throw new AppError(err.message);
~~~

src/controllers/ContactController.ts:129:24 - error TS2571: Object is of type 'unknown'.

129 throw new AppError(err.message);
~~~

src/controllers/QuickAnswerController.ts:45:24 - error TS2571: Object is of type 'unknown'.

45 throw new AppError(err.message);
~~~

src/controllers/QuickAnswerController.ts:83:24 - error TS2571: Object is of type 'unknown'.

83 throw new AppError(err.message);
~~~

src/libs/wbot.ts:131:20 - error TS2769: No overload matches this call.
Overload 1 of 2, '(obj: object, msg?: string | undefined, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'object'.
Overload 2 of 2, '(msg: string, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'string'.

131 logger.error(err);
~~~

src/libs/wbot.ts:153:18 - error TS2769: No overload matches this call.
Overload 1 of 2, '(obj: object, msg?: string | undefined, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'object'.
Overload 2 of 2, '(msg: string, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'string'.

153 logger.error(err);
~~~

src/services/QueueService/CreateQueueService.ts:59:24 - error TS2571: Object is of type 'unknown'.

59 throw new AppError(err.message);
~~~

src/services/QueueService/UpdateQueueService.ts:63:24 - error TS2571: Object is of type 'unknown'.

63 throw new AppError(err.message);
~~~

src/services/UserServices/CreateUserService.ts:53:24 - error TS2571: Object is of type 'unknown'.

53 throw new AppError(err.message);
~~~

src/services/UserServices/UpdateUserService.ts:46:24 - error TS2571: Object is of type 'unknown'.

46 throw new AppError(err.message);
~~~

src/services/WbotServices/CheckIsValidContact.ts:16:9 - error TS2571: Object is of type 'unknown'.

16 if (err.message === "invalidNumber") {
~~~

src/services/WbotServices/StartWhatsAppSession.ts:24:18 - error TS2769: No overload matches this call.
Overload 1 of 2, '(obj: object, msg?: string | undefined, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'object'.
Overload 2 of 2, '(msg: string, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'string'.

24 logger.error(err);
~~~

src/services/WbotServices/wbotMessageListener.ts:110:18 - error TS2769: No overload matches this call.
Overload 1 of 2, '(obj: object, msg?: string | undefined, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'object'.
Overload 2 of 2, '(msg: string, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'string'.

110 logger.error(err);
~~~

src/services/WbotServices/wbotMonitor.ts:27:22 - error TS2769: No overload matches this call.
Overload 1 of 2, '(obj: object, msg?: string | undefined, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'object'.
Overload 2 of 2, '(msg: string, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'string'.

27 logger.error(err);
~~~

src/services/WbotServices/wbotMonitor.ts:46:22 - error TS2769: No overload matches this call.
Overload 1 of 2, '(obj: object, msg?: string | undefined, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'object'.
Overload 2 of 2, '(msg: string, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'string'.

46 logger.error(err);
~~~

src/services/WbotServices/wbotMonitor.ts:61:22 - error TS2769: No overload matches this call.
Overload 1 of 2, '(obj: object, msg?: string | undefined, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'object'.
Overload 2 of 2, '(msg: string, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'string'.

61 logger.error(err);
~~~

src/services/WbotServices/wbotMonitor.ts:73:18 - error TS2769: No overload matches this call.
Overload 1 of 2, '(obj: object, msg?: string | undefined, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'object'.
Overload 2 of 2, '(msg: string, ...args: any[]): void', gave the following error.
Argument of type 'unknown' is not assignable to parameter of type 'string'.

73 logger.error(err);
~~~

src/services/WhatsappService/CreateWhatsAppService.ts:50:24 - error TS2571: Object is of type 'unknown'.

50 throw new AppError(err.message);
~~~

src/services/WhatsappService/UpdateWhatsAppService.ts:52:24 - error TS2571: Object is of type 'unknown'.

52 throw new AppError(err.message);
~~~

Found 24 errors in 15 files.

Errors Files
4 src/tests/unit/User/AuthUserService.spec.ts:46
1 src/tests/unit/User/CreateUserService.spec.ts:44
2 src/controllers/ContactController.ts:74
2 src/controllers/QuickAnswerController.ts:45
2 src/libs/wbot.ts:131
1 src/services/QueueService/CreateQueueService.ts:59
1 src/services/QueueService/UpdateQueueService.ts:63
1 src/services/UserServices/CreateUserService.ts:53
1 src/services/UserServices/UpdateUserService.ts:46
1 src/services/WbotServices/CheckIsValidContact.ts:16
1 src/services/WbotServices/StartWhatsAppSession.ts:24
1 src/services/WbotServices/wbotMessageListener.ts:110
4 src/services/WbotServices/wbotMonitor.ts:27
1 src/services/WhatsappService/CreateWhatsAppService.ts:50
1 src/services/WhatsappService/UpdateWhatsAppService.ts:52
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: tsc
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant