Skip to content

[ERROR] Invalid URL #87

@narduin

Description

@narduin

Describe the bug

Versions:

  • astro@4.9.2
  • astro-i18n@2.2.4
  • node v18.20.3 & 20.13.1 tested

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!

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions