docker
docker copied to clipboard
docker compose build fails with Type error: 'searchParams' is possibly 'null'.
I did a fresh git clone and tried to build the docker container according to the instructions but it fails:
Linting and checking validity of types ...
Failed to compile.
../../packages/features/ee/event-tracking/lib/posthog/web/PostHogPageView.tsx:15:11
Type error: 'searchParams' is possibly 'null'.
13 | if (pathname && posthog) {
14 | let url = window.origin + pathname;
> 15 | if (searchParams.toString()) {
| ^
16 | url = `${url}?${searchParams.toString()}`;
17 | }
18 | posthog.capture("$pageview", {
The command '/bin/sh -c yarn --cwd apps/web workspace @calcom/web run build' returned a non-zero code: 1
i guess changing line 15 to
if (searchParams?.toString()) {
will fix the issue?
i guess changing line 15 to
if (searchParams?.toString()) {will fix the issue?
Yes, worked for me!
This was fixed in cal.com core via this PR. Closing.