Comments (13)
I'm seeing a similar issue after moving to Gen 2 React SDK, but I'm running on Next.js v14.1 and I'm only seeing these errors locally. I'm using Node 18, so isolated-vm
shouldn't be an issue here, though I am running on an M1 Macbook Pro.
At least I'm only seeing issues locally, our preview builds on Vercel (haven't pushed Gen 2 to production yet) seem to be performing just as well as on Gen 1.
@tgaribal ☝️ This is the same issue I emailed you about yesterday.
from builder.
Where are you deploying Remix? Remix encourages you to deploy to an edge runtime, which inherently does not support the isolated-vm
package, as it uses NodeJS internals.
If you are deploying to an edge runtime, you need to update your imports to @builder.io/sdk-react/edge
, so that they do not rely on isolated-vm
at all. We are working on updating our documentation regarding the Gen2 SDK to reflect this information.
from builder.
We are deploying on fly.io using node20.
I just tried to deploy the Remix project on Vercel Edge using the Vercel preset for Remix and @builder.io/sdk-react/edge. However, the result was an error: [GET] /en reason=EDGE_FUNCTION_INVOCATION_TIMEOUT, status=504, user_error=true.
from builder.
Same on Cloudflare page, with import {Content, fetchOneEntry} from "@builder.io/sdk-react";
and import {Content, fetchOneEntry} from "@builder.io/sdk-react/edge";
and I'm getting Worker exceeded resource limits
from builder.
const e = safeDynamicRequire("isolated-vm");
return new e.Isolate({
memoryLimit: 128
}).createContextSync();
In my side e undefined, I think it's because of this
I tried to add
const context = isolate.createContextSync();
Builder.setServerContext(context);
inside the loader of my root.tsx but now I can't deploy to the edge :
The Edge Function "*" is referencing unsupported modules:
- isolated-vm: ./out/isolated_vm
from builder.
We are also facing this issue with remix sdk when we migrate from 1 to 2
from builder.
Hey folks. I wanted to provide some updates:
- When it comes to deploying a Nextjs Pages app on Vercel, we have identified an issue on the side of Next/Vercel and are waiting for a fix: vercel/next.js#63492. The SDK seems unable to import the
isolated-vm
package when it's deployed on Vercel. We are actively investigating this and looking for workarounds. We know that pre-rendering the page seems to resolve the issue, and the issue does not seem to reproduce in a Next App router app. - We have recently added a caching layer to our dynamic bindings evaluation: https://github.com/BuilderIO/builder/blob/main/packages/sdks/output/react/CHANGELOG.md#1012 . This should greatly enhance the performance of the SDK, which might be the root cause behind the
Worker exceeded resource limits
issues.
We are still investigating further and will let you know when we have a solution
from builder.
Hey @samijaber ,
I just deploy on our staging server on fly (performance@2x) the new sdk without the RUN grep -rli 'arm64' * | xargs -i@ sed -i 's/arm64/x64/g' @
So, now the server is not crashing! but the performance are still not acceptable in a seo pespective...
The output of the log is still the same : [Builder.io]: Failed code evaluation: Cannot read properties of undefined (reading 'Isolate') {
from builder.
Related Issues (20)
- Key option is not correctly forwarded in builder.getAll HOT 2
- Builder SDK Vue breaks after 0.12.4 (properties of null (reading 'isCE') HOT 2
- defineProps macro in vue 3 with TS (custom components) HOT 1
- `@builder.io/sdk-react-native` fails to render due to rendering a `div` in `DynamicRenderer` HOT 7
- How to give just simple array as prop HOT 2
- `$elemMatch` operator does not work in the new SDK HOT 5
- Types broke in Vue SDK after 0.12.8 HOT 3
- Is it possible to have dynamically created pages? HOT 1
- see image preview instead cloud icon HOT 2
- `npm run dev` error caused by `@builder.io/dev-tools`: package.json invalid path HOT 1
- sdk-react gen2 useContext HOT 7
- `npm run dev` "package.json invalid path" error caused by `@builder.io/dev-tools` HOT 3
- Required rule doesn't work on field of type "file" if it's nested in object
- Custom component with many localized fields freezes entire Builder editor and throws many errors in console HOT 1
- Field of type "reference" restricted to specific model allows to choose entry of some random model HOT 1
- BUG: Builder Contentful Plugin Dynamic Data Binding Issue HOT 6
- Add a way to override fetch function in fetchEntries and fetchOneEntry
- `@builder.io/sdk-vue` is not properly reporting type declarations in `package.json`, causing type errors HOT 3
- Missing document for React SDK Gen 2 on `Adding editable regions to custom components` section of the docs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from builder.