Can't connect my next.js project to builder.io

Hello! I have a project on next.js and I try to connect it to builder.io. API key is right, but it doesn’t work. Could you help me?

Hi aaaaa​,

Could you please provide a bit more information about the issue you’re encountering? For example, are there any error messages when trying to connect, or the steps to reproduce the issue?

This will help me better understand the issue and assist you more effectively. I look forward to your response!"

Thanks,

Hi @ParthSharma , thank you for the answer. I made a function, called registrationBuilder(). In this function I’m planning to initialize the builder(using API key, of course) and register the components. I call this function on my […page].tsx file. API key is right. But on builder I see this(screenshot)

Hi aaaaa,

The preview URL localhost:3000 will require Builder integration for the landing pages as well. To achieve this, you can take one of the following approaches:

  1. Change the folder structure: Modify [...page].tsx to [[...page]].tsx in order to use a catch-all route.
  2. Integrate Builder specifically for the landing page: Add the integration code directly in index.tsx or page.tsx within the pages or app directory.

Thanks,