-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(cli): load polyfill before loading config during astro add
#10105
Conversation
🦋 Changeset detectedLatest commit: e91339f The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must have been introduced with the edge middleware verification, good catch! Can you please add a changeset?
This is weird, though, we have a polyfill for crypto: astro/packages/astro/src/core/polyfill.ts Lines 6 to 10 in e24db1d
|
@negativems, what's your local version of Node.js? What's the version of the runtime in Vercel? |
@negativems can you try this version of the vercel adapter, and see if that fixes your issue?
|
!preview node-crypto-error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this on!
Snapshots have been released for the following packages:
Publish Log
Build Log
|
astro add
I tried to import Vue Astro adapter and I got an error. The error is the next one:
And I tried to import any other adapter and I get the same error when using the Vercel serverless adapter.
After seeing the problem, I added the node crypto import into the Vercel adapter and the error gone:
Edit:
This is my astro.config.mjs