i18n
i18n copied to clipboard
Error "Cannot find module 'i18n:astro' or its corresponding type declarations." on a fresh Astro project
What I did:
- Created a new Astro project through npm, options > ts: strictest, template: blog, install dependencies
npm create astro@latest
- I've added I18n for Astro > options: yes to all
npm run astro add @astrolicious/i18n
-
Added
routesandlocalesfolders insrc, if not dev server throughnpx astro devwouldn't launch -
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.