Skip to content
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: Failed to execute 'encode' on 'TextEncoder': parameter 1 is not of type 'String' in Edge Runtime SSR #6070

Merged
merged 3 commits into from
Feb 1, 2023

Conversation

AirBorne04
Copy link
Contributor

@AirBorne04 AirBorne04 commented Jan 31, 2023

Changes

  • fix small issue in SSR mode SolidJS integration breaks app when used in Vercel Edge #5915
  • this is not fixing the Solid build for vercel, so for Solid it will still state something like Error: Pa is not supported in the browser, returning undefined that is a vercel adapter issue only and we need to update the build steps there.

Testing

Tested example applications for react and solid on vercel.

Docs

@changeset-bot
Copy link

changeset-bot bot commented Jan 31, 2023

🦋 Changeset detected

Latest commit: e306ded

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jan 31, 2023
@bholmesdev
Copy link
Contributor

@AirBorne04 Hm, still seeing Error: Pa is not supported in the browser, returning undefined trying this fix with a prebuilt deploy using SolidJS. Is this meant to resolve #5915?

@AirBorne04
Copy link
Contributor Author

AirBorne04 commented Jan 31, 2023

These fixes are only for the issues in core / to fix eg cloudflare for now. The solid + vercel needs an additional fix in the vercel adapter.
So only partial fix for #5915

Copy link
Contributor

@bholmesdev bholmesdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NWTWWHB (not worse than what we had before!)

Copy link
Contributor

@bholmesdev bholmesdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing my review sorry! Comment before merging

packages/astro/src/runtime/server/render/component.ts Outdated Show resolved Hide resolved
@AirBorne04 AirBorne04 changed the title minor fixes for errors related to edge runtime SSR in core fix: Failed to execute 'encode' on 'TextEncoder': parameter 1 is not of type 'String' in Edge Runtime SSR Feb 1, 2023
@AirBorne04 AirBorne04 added adapter-cloudflare pkg: vercel Related to Vercel adapter (scope) labels Feb 1, 2023
@AirBorne04 AirBorne04 linked an issue Feb 1, 2023 that may be closed by this pull request
1 task
@bholmesdev bholmesdev merged commit f91615f into withastro:main Feb 1, 2023
@astrobot-houston astrobot-houston mentioned this pull request Feb 1, 2023
matthewp pushed a commit that referenced this pull request Feb 3, 2023
…of type 'String' in Edge Runtime SSR (#6070)

* minor fixes for errors related to vercel SSR in core

* yielding empty string instead of nothing, to not exit the iterator

---------

Co-authored-by: AirBorne04 <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: vercel Related to Vercel adapter (scope)
Projects
None yet
2 participants