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

docker compose build fails with Type error: 'searchParams' is possibly 'null'. #391

Open
neuhaus opened this issue Nov 6, 2024 · 2 comments

Comments

@neuhaus
Copy link

neuhaus commented Nov 6, 2024

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
@neuhaus
Copy link
Author

neuhaus commented Nov 6, 2024

i guess changing line 15 to
if (searchParams?.toString()) {
will fix the issue?

@mabdelfattah
Copy link

i guess changing line 15 to if (searchParams?.toString()) { will fix the issue?

Yes, worked for me!

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

2 participants