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

Astro 3 + Vercel + redirect throws "The argument 'path' must be a string or Uint8Array without null bytes." #8315

Closed
1 task done
raulfdm opened this issue Aug 31, 2023 · 2 comments · Fixed by #8320
Closed
1 task done
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) pkg: astro Related to the core `astro` package (scope)

Comments

@raulfdm
Copy link
Contributor

raulfdm commented Aug 31, 2023

Astro info

Astro version            v3.0.3
Package manager          pnpm
Platform                 darwin
Architecture             arm64
Adapter                  @astrojs/vercel/serverless
Integrations             @astrojs/react

What browser are you using?

Not relevant

Describe the Bug

After migrating to Astro 3, using Vercel adapter + redirect in the config throws an error:

11:58:12 [build] Building server entrypoints...
[vite:load-fallback] Could not load @astro-page:/uses (imported by @astro-page-split:/uses): The argument 'path' must be a string or Uint8Array without null bytes. Received '\x00@astro-page:/uses'
 error   Could not load @astro-page:/uses (imported by @astro-page-split:/uses): The argument 'path' must be a string or Uint8Array without null bytes. Received '\x00@astro-page:/uses'
TypeError [PLUGIN_ERROR]: Could not load @astro-page:/uses (imported by @astro-page-split:/uses): The argument 'path' must be a string or Uint8Array without null bytes. Received '\x00@astro-page:/uses'
    at TypeError.get (https://githubvnkvuj-ebm4.w-credentialless.staticblitz.com/blitz.33975f1d.js:67:7048)
    at eval (/home/projects/github-vnkvuj/node_modules/.pnpm/astro@3.0.3/node_modules/astro/dist/core/errors/dev/utils.js:35:11)
    at Module.collectErrorMetadata (/home/projects/github-vnkvuj/node_modules/.pnpm/astro@3.0.3/node_modules/astro/dist/core/errors/dev/utils.js:34:7)
    at throwAndExit (/home/projects/github-vnkvuj/node_modules/.pnpm/astro@3.0.3/node_modules/astro/dist/cli/throw-and-exit.js:31:55)
    at cli (/home/projects/github-vnkvuj/node_modules/.pnpm/astro@3.0.3/node_modules/astro/dist/cli/index.js:164:11)
/home/projects/github-vnkvuj/apps/website:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  website@0.0.1 build: `astro build`
Exit status 1

What's the expected result?

Compiles without error

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-vnkvuj?file=README.md

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Aug 31, 2023
@raulfdm
Copy link
Contributor Author

raulfdm commented Aug 31, 2023

CleanShot.2023-08-31.at.12.02.05.mp4

@ematipico ematipico self-assigned this Aug 31, 2023
@ematipico ematipico added pkg: astro Related to the core `astro` package (scope) - P4: important Violate documented behavior or significantly impacts performance (priority) and removed needs triage Issue needs to be triaged labels Aug 31, 2023
@ematipico
Copy link
Member

Thank you, @raulfdm, you always provide the most amazing reproductions! A fix is on the way :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants