-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@builder.io/sdk-vue runtime is not honored on Vercel #2111
Comments
Hi. Please note that |
Thx @pi0 . I am using |
These are two completely different runtimes:
One deployment/project can be against one of these. From your requirements, it seems you both need Node.js for sentry profiling and builder.io with Also I notice that your reproduction the SDK is imported Have you tried to update your import to |
Yes, that works fine. On Vercel. Locally (running From what I understand, using the import |
Yes it should work and if i were a library author, I would use main subpath export for universal builds (not a Node.js dependent variant). Thanka for confirming that I think there is nothing much for us to do (vercel is a node preset and they never request any different condition that I am aware of. if there is one, both Nitro and libraries can use them. Best luck ;) |
Thank you very much for your swift and detailed reponses. Very much appreciated! 🙏 |
Environment
Nuxt 3.9.3, Vercel default (nodejs 18), nitropack 2.8.1
Reproduction
When building a minimal Nuxt3 project integrating the builder.io toolkit and deploying it on vercel, the output does not use the
vercel-light
edge export defined in the package'spackage.json
.See https://github.com/20x-dz/builder-vue-test for a simple project and https://builder-vue-test.vercel.app/ for the current output.
Describe the bug
After deploying to vercel, the package export for the
edge-light
environment is not used, but the defaultnode
environment is used instead, resulting in the following error:Cannot find module 'isolated-vm' Require stack: - /var/task/node_modules/@builder.io/sdk-vue/lib/node/index.29fcda33.js
As mentioned in BuilderIO/builder#2933 (comment) adjusting the import to use the
edge
export directly fixes this issue (import { Content, fetchOneEntry, isPreviewing } from "@builder.io/sdk-vue/edge";
), but then breaks when developing locally.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: