Replies: 2 comments
-
similar issue here 🔨 |
Beta Was this translation helpful? Give feedback.
-
Assuming this doesn't happen on bare Remix template, you would probably need to provide more details for anyone to help (or preferably open an issue on Remix with the reproduction). For example, like they already ask on the issue template https://github.com/remix-run/remix/issues/new?assignees=&labels=bug%3Aunverified&projects=&template=bug_report.yml, what's the version you have? npx envinfo --system --npmPackages '{vite,@remix-run/*}' --binaries --browsers Also probably you should at least share your vite config. I'm suspecting there might be an issue with custom |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm new to Vite, coming here by adopting it in Remix, so please have patience with me, I really don't know yet why/how things work the way they work.
When "bundling for SSR' with Remix I expected native Node.js modules like
http
to be detected and ignored somehow, which is not the case (per default). I'm receing the error:I.e. Vite
commonjs--resolver
is trying to resolve this package which leads to the npm security placeholder package, instead of the native Node.js package. This cannot be resolved, though, as it does not contain any main/module/exports etc.This is my workaround:
Is this the suggested approach, or are there other ways to tell vite, "hey please treat native Node.js modules as such"?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions