Closed rafaelgimeno closed 3 months ago
Can you post your full config? Many people are successfully using aliases and astro check
, including myself.
Closing due to inactivity. Many people use astro check
and import aliases together with no issues, so this is likely a configuration issue.
Describe the Bug
I'm using Astro version
v4.4.0
& the last version of @astrojs/checkv0.5.5
. Also I have configured a list of aliases paths intsconfig.json
file.When I run the task "npm run astro check", I get a lot of errors of this type: "Cannot find module '@layouts/Layout.astro' or its corresponding type declarations." (one by every component or layout imported).
It only happens with
astro check
, in dev mode everything works ok.Steps to Reproduce
Have an aliased folders in tsconfig.json:
Use one of these aliases in an Astro file:
import Layout from "@layouts/Layout.astro";
Run the task astro check:
npm run astro check