Moving towards Nextjs 15, I’m getting this error when building
/node_modules/@builder.io/dev-tools/next/index"’ has no default export.
This is “@builder.io/dev-tools”: “^1.1.35” for a page model updated for Nextjs 15
Moving towards Nextjs 15, I’m getting this error when building
/node_modules/@builder.io/dev-tools/next/index"’ has no default export.
This is “@builder.io/dev-tools”: “^1.1.35” for a page model updated for Nextjs 15
Building with Node v20.11.1
Hello @jasperkooij,
Thank you for reporting this potential issue. We have been able to replicate it on our end, and we suspect it may be related to the compatibility of the dev tools with Next 15. We will investigate this further and keep you updated on our progress.
In the meantime, the dev tools appear to be functioning properly despite the error. You can continue with your upgrade, and please let us know if you encounter any other issues.
Best regards,
Hi Manish,
Thanks for the update. I can develop locally, everything seems to be working fine but I can’t build my project for now.
Hello @jasperkooij,
I wanted to update you that a fix has been deployed to improve dev-tools support with Next.js 15. The issue with the default export error should now be resolved. Please verify the changes and let us know if you encounter any further issues.
Best regards,
@manish-sharma Thanks for the update!
Are these the versions that I need for the update?
"@builder.io/dev-tools": "^1.1.39",
"@builder.io/react": "^7.0.1",
"@builder.io/sdk": "^5.0.0",
"@builder.io/sdk-react": "^3.0.0",
Hello @jasperkooij,
Apologies. It seems the fix has been merged but not yet made available in production. I’ll update you about the latest versions as soon as they’re deployed live.
@manish-sharma Thanks for checking!
Hello @jasperkooij,
The fix is expected to be released next week in production. We will notify you once it’s available.
Best regards,
@manish-sharma Thanks for the update!
Hi @jasperkooij - I am glad to confirm that the fix has been released.
@manish-sharma Then with Nextjs 15 breaking changes, is this the recommended way to update the page in the app router to display the Builder page content?
Hello @jasperkooij,
Here is a working example of NextJs 15 with builder react Gen 2 sdk
import {
Content,
fetchOneEntry,
getBuilderSearchParams,
isPreviewing,
} from "@builder.io/sdk-react";
import Header from "../components/Header";
import Footer from "../components/Footer";
interface PageProps {
params: {
slug: string[];
};
searchParams: Record<string, string>;
}
const PUBLIC_API_KEY = "API-KEY";
export default async function Page(props: PageProps) {
const urlPath = "/" + (props.params?.slug?.join("/") || "");
const content = await fetchOneEntry({
options: getBuilderSearchParams(props.searchParams),
apiKey: PUBLIC_API_KEY,
model: "page",
userAttributes: { urlPath },
});
const canShowContent = content || isPreviewing(props.searchParams);
if (!canShowContent) {
return (
<>
<h1>404</h1>
<p>Make sure you have your content published at Builder.io.</p>
</>
);
}
return (
<>
<Header />
<Content content={content} apiKey={PUBLIC_API_KEY} model="page" />
<Footer />
</>
);
}
Let us know if you have any further questions.
Best regards,
@manish-sharma Not to pile on here, but…
We’re starting a new project on NextJS v15 with Gen1 SDK, and I’m seeing the same error in my next.config.ts file that ".../node_modules/@builder.io/dev-tools/next/index" has no default export
.
Dependencies:
"@builder.io/dev-tools": "^1.1.42",
"@builder.io/react": "^7.0.1",
"@builder.io/sdk": "^5.0.0",
"next": "15.0.4",
"react": "^19.0.0",
"react-dom": "^19.0.0"
Is it possible there was a regression with newer versions of the dev-tools package?
Hello @chtbks-jason,
This is a known issue, and we are currently investigating it internally. I will be sure to keep you updated as soon as we make any progress or deploy a fix.
Thanks,
Hello @chtbks-jason, @jasperkooij,
The reported issue has been addressed and resolved in our latest dev-tools release.
You can find the updated package here: @builder.io/dev-tools.
Please feel free to reach out if you encounter any further issues—we’re here to help!
Thanks,