Open NachoVazquez opened 1 year ago
I've been getting the same ( from astro dev
) since I started refactoring a collection of related projects into a monorepo, with my Astro web UI now in as an npm workspace, something seems to have gone wrong with module resolution. There is no error in vscode while editing .astro pages that import the auth-astro components, but the components fail to load when running astro dev
But, in my case, it builds without error, and astro preview renders the auth-astro components just fine with functioning signin and signout, no 404 errors.
It would be really great to figure out where the import resolution is breaking in astro dev
, maybe an alias in the vite config could fix it.
Edit: my situation my not be related, I just noticed my server errors include a /_modules/ path prefix that does not exist, and I'm not sure where that part is coming from
[serve] 404 /_modules/auth-astro/src/components/SignIn.astro
[serve] 404 /_modules/auth-astro/src/components/SignOut.astro
But still, it's only an issue for me while running as astro dev
and works fine in astro preview
after astro build
I'm getting some errors when trying to access the SignIn and SignOut components.
The code
The errors
Server Error (running on dev):
404 /h-astro/src/components/SignIn.astro
Client Error:
GET p://localhost:3000/h-astro/src/components/SignIn.astro?astro&type=script&index=0&lang.ts net::ERR_ABORTED 404 (Not Found)
The Config