Open RobSchilderr opened 3 weeks ago
We ran into this (we're on NextJS 14.1) following the same instructions, the workaround is to manually declare the module (it is there in the package just not declared?)
Add something like decs.d.ts
to your root
declare module '@builder.io/sdk-react/node/init';
Yes, there is an issue with the types not propagating correctly for certain TS configurations. We will investigate this, thanks for reporting.
The import itself should work correctly on the JS side.
Describe the bug In this example, provided by Builder.io, it is suggested to use the following code snippet:
However, initializeNodeRuntime does not seem to exist within the module, as evidenced by the following error screenshot:
This issue occurs despite following the recommended setup. I would prefer to use this package due to its compatibility with the pages router in my project, which precludes using the Next.js SDK.
Additionally, I attempted to use the directive 'use client' at the top of the file to handle client-side custom components, but this approach failed to resolve the issue.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Additional context
Using Next.js version 13.4.8 and following the guide provided in the Builder.io GitHub repository.