#Builder IO not working with Qwik

97 messages ยท Page 1 of 1 (latest)

low cove
#

I'm trying to integrate Builder.io into a Qwik project, but I'm not having any success. I followed these steps:

npm create qwik@latest to create a new Qwik project.
npm run qwik add builder.io to add the Builder.io integration.
Configured the preview URL with localhost:5173.
Despite this, I can't get it to work properly. Could you help me identify where the problem might be?

shadow nebula
#

We recently setup builder ourselves and it's working for us

#

Also did you create a new page?

low cove
#

lo server local is running

#

yes i created new page

#

So config preview URL in model page settings

#

At this moment I created the project in qwik with version 1.8.0

shadow nebula
low cove
#

It still doesIt still doesn't work for me, I've tried manually and with the help of devtoolsn't work for me ๐Ÿ˜”

#

I don't know if this is only happening to me.

shadow nebula
low cove
#

thanks

shadow nebula
#

Hey @low cove still around?

low cove
#

Hello

#

i'm here

shadow nebula
#

Just reached out

low cove
#

ok

#

I understand little English

shadow nebula
#

Ah gotcha

#

Yeah it's gonna be hard for me to help then ๐Ÿ˜…

#

I could try taking a quick look at your repo if that's open source and see if I catch anything out of place

low cove
#

Ok, let me upload this test to github and share the repo with you, thanks

shadow nebula
#

like API key values

low cove
#

ok

#

thank you

shadow nebula
#

Changes in index look correct

low cove
#

this is the last version of @builder.io/sdk-qwik > 0.16.6?

#

Ok, pushed

shadow nebula
#

Everything else looks good

#

So maybe it's on the builder side

#

or something with the API Key

#

Make sure it's the correct route, that the publish button has been hit, that there's a page model made for the / route, and that your dev server is running

low cove
#

They publish button into builder io?

shadow nebula
#

There should be a builder publish button top right of your screen

#

in builder dashboard

low cove
#

Ok, I'll check now

#

but publish button without preview loaded?

shadow nebula
#

is your dev server running on port 5173?

low cove
#

yes my dev server is running in this port

shadow nebula
#

do you have your builder api key added in the env?

low cove
#

now is published, but continue wrong

low cove
#

is strange

#

We can try in a call screen sharing?

shadow nebula
#

and you have page here added as a page model?

low cove
#

yes

shadow nebula
#

can you show me a picture inside here

low cove
#

ok

shadow nebula
#

Hm... yeah I am not sure

low cove
#

is it working for you?

shadow nebula
#

This seems more to me like a problem on the builder dashboard side. What you have in your repo looks right

shadow nebula
#

at work

low cove
#

ok i goto review

shadow nebula
#

I would reach out to builder support or forum at this point

low cove
#

oh ok, thank you for your time, good night

shadow nebula
#

ph waot

#

oh wait

#

try something else instead of import.meta here

low cove
#

ok i import the api key directly?

shadow nebula
#

try process.env.PUBLIC_BUILDER_API_KEY

low cove
#

good

shadow nebula
#

I also see this missing

    options: getBuilderSearchParams(url.searchParams),
low cove
shadow nebula
#

inside of fetchOneEntry

#
  const builderContent = await fetchOneEntry({
    model: BUILDER_MODEL,
    apiKey: BUILDER_PUBLIC_API_KEY,
    options: getBuilderSearchParams(url.searchParams),
    userAttributes: {
      urlPath: url.pathname,
    },
  });
#

this is what we have

low cove
shadow nebula
#
export const useBuilderContent = routeLoader$(async ({ url }) => {
  // Fetch content for the specified model using the API key.
  const builderContent = await fetchOneEntry({
    model: BUILDER_MODEL,
    apiKey: BUILDER_PUBLIC_API_KEY,
    options: getBuilderSearchParams(url.searchParams),
    userAttributes: {
      urlPath: url.pathname,
    },
  });

  // Return the fetched content.
  return builderContent;
});
low cove
#

Keeps failing

shadow nebula
#

remove that if conditional

#

was it showing this before?

#

that is what I end up seeing my dev server

low cove
#

yes ever show this

low cove
shadow nebula
#

I went ahead and deleted the image because it included your api key

#

Ok well I think your close, that's pretty much everything I noticed ๐Ÿคž

low cove
#

no problem this is a test project

#

ok thank you

#

Rest well, good night.

low cove
#

I just tried to run the local server and tested it in builder and it works now, thank you very much

low cove
#

I found my error, the problem is the Brave browser, it does not load in this browser
in Chome and firefox they works

#

Zen browser works perfectly