Hello, all. I am not sure why, but on SSR, the build on my Astro project is failing with the following message:
[commonjs--resolver] Failed to resolve entry for package "fs". The package may have incorrect main/module/exports specified in its package.json.
error Failed to resolve entry for package "fs". The package may have incorrect main/module/exports specified in its package.json.
My astro.config.mjs file is pretty straightforward:
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import node from "@astrojs/node";
import react from "@astrojs/react";
// https://astro.build/config
export default defineConfig({
output: "server",
integrations: [tailwind(), react()],
adapter: node({
mode: "standalone",
}),
});
If I comment out output: "server", the build runs but obviously doesn't work since I don't have getStaticPaths() set (the intention is to run this as full SSR).
I read that this might be some error in code and so I have failed to create a reproducible example, however I don't know where to look. Already tried to turn off each integration, check if I'm using client: directives on Astro components and some other things.
Any ideas on how I can proceed?