i18n icon indicating copy to clipboard operation
i18n copied to clipboard

Error "Cannot find module 'i18n:astro' or its corresponding type declarations." on a fresh Astro project

Open quasiDigi opened this issue 1 year ago • 0 comments

What I did:

  1. Created a new Astro project through npm, options > ts: strictest, template: blog, install dependencies
npm create astro@latest
  1. I've added I18n for Astro > options: yes to all
npm run astro add @astrolicious/i18n
  1. Added routes and locales folders in src, if not dev server through npx astro dev wouldn't launch

  2. On my BlogPost layout I try to get the locale, as explained in the docs:

---
import { getLocale } from "i18n:astro"

const locale = getLocale()
---

Result:

I get the following error:

Cannot find module 'i18n:astro' or its corresponding type declarations.

best, q.

quasiDigi avatar Aug 21 '24 19:08 quasiDigi