[GH-ISSUE #101] Docker Build Fails due to TypeScript Error in web/src/main.ts #23

Closed
opened 2026-02-27 04:58:47 +03:00 by kerem · 1 comment
Owner

Originally created by @Repsay on GitHub (Jul 2, 2023).
Original GitHub issue: https://github.com/guyzyl/whatsapp-contact-sync/issues/101

Hello,

I encountered an issue while trying to build the Docker image for the whatsapp-contact-sync project. The build process fails during the npm run build step for the web-build with a TypeScript error.

The error message is as follows:

src/main.ts(68,41): error TS2345: Argument of type '{ pageTrackerTemplate(to: RouteLocationNormalized): { page_title: string; page_path: string; }; config: { id: string; }; }' is not assignable to parameter of type 'PluginOptions'.
Types of property 'pageTrackerTemplate' are incompatible.
Type '(to: RouteLocationNormalized) => { page_title: string; page_path: string; }' is not assignable to type '() => PageView'. 

It appears there's a type mismatch between the pageTrackerTemplate function and the PluginOptions type. The pageTrackerTemplate function seems to be expecting no arguments and a return type of PageView, but the provided function takes a RouteLocationNormalized argument and returns an object with page_title and page_path.

Originally created by @Repsay on GitHub (Jul 2, 2023). Original GitHub issue: https://github.com/guyzyl/whatsapp-contact-sync/issues/101 Hello, I encountered an issue while trying to build the Docker image for the `whatsapp-contact-sync` project. The build process fails during the `npm run build` step for the web-build with a TypeScript error. The error message is as follows: ``` src/main.ts(68,41): error TS2345: Argument of type '{ pageTrackerTemplate(to: RouteLocationNormalized): { page_title: string; page_path: string; }; config: { id: string; }; }' is not assignable to parameter of type 'PluginOptions'. Types of property 'pageTrackerTemplate' are incompatible. Type '(to: RouteLocationNormalized) => { page_title: string; page_path: string; }' is not assignable to type '() => PageView'. ``` It appears there's a type mismatch between the `pageTrackerTemplate` function and the `PluginOptions` type. The `pageTrackerTemplate` function seems to be expecting no arguments and a return type of `PageView`, but the provided function takes a `RouteLocationNormalized` argument and returns an object with `page_title` and `page_path`.
kerem closed this issue 2026-02-27 04:58:47 +03:00
Author
Owner

@guyzyl commented on GitHub (Jul 2, 2023):

Thanks for fixing it!

<!-- gh-comment-id:1616697808 --> @guyzyl commented on GitHub (Jul 2, 2023): Thanks for fixing it!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whatsapp-contact-sync#23
No description provided.