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

[ERROR] Invalid URL #87

Open
narduin opened this issue May 27, 2024 · 3 comments
Open

[ERROR] Invalid URL #87

narduin opened this issue May 27, 2024 · 3 comments
Assignees

Comments

@narduin
Copy link

narduin commented May 27, 2024

Describe the bug

Versions:

An error is happening as soon as I launch my astro project.

At first it was working insanely great, but at some point (and I don't know why) it started showing this error constantly.

TypeError
An error occurred.

Invalid URL
src/index.js:12:30050

TypeError: Invalid URL
    at new URL (node:internal/url:797:36)
    at set route [as route] (/i18n-bug/node_modules/astro-i18n/dist/src/index.js:12:30050)
    at /i18n-bug/node_modules/astro-i18n/dist/src/index.js:12:36680
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async callMiddleware (file:///i18n-bug/node_modules/astro/dist/core/middleware/callMiddleware.js:21:10)
    at async RenderContext.render (file:///i18n-bug/node_modules/astro/dist/core/render-context.js:148:22)
    at async handleRoute (file:///i18n-bug/node_modules/astro/dist/vite-plugin-astro-server/route.js:209:18)
    at async run (file:///i18n-bug/node_modules/astro/dist/vite-plugin-astro-server/request.js:40:14)
    at async runWithErrorHandling (file:///i18n-bug/node_modules/astro/dist/vite-plugin-astro-server/controller.js:64:5)
    at async handleRequest (file:///i18n-bug/node_modules/astro/dist/vite-plugin-astro-server/request.js:34:3)

I didn't event import astroI18n or a translation function into the page.

To Reproduce

  1. Create an astro project (latest is 4.9.2)
  2. Add astro-i18n and config
  3. Add an index page with a
  4. Sync i18n and launch dev server
  5. try to navigate/reload pages

Expected behavior
Website should show pages.

Mandatory reproduction repository
Add a git repository to reproduce the bug.

Thanks a lot!

@filipslezaklab
Copy link

Got the same issue, on setup it worked and after i18n:sync it broke with that error and never worked again, with this bug this otherwise great lib is unusable. Tried downgrading both astro and astro-i18n versions but did not help. Did not matter if there was only one language or multiple.

@Haxikowy
Copy link

Haxikowy commented Oct 3, 2024

@Alexandre-Fernandez Is it possible this will be fixed? I found out that it does work when you have created 404.astro page and have [email protected] at the most.

@filip-glowicki
Copy link

I have the same problem as @Haxikowy. I would be very grateful if you would give information on this matter :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants