- Setup the project and run the dev server you'll see this error
Error: [vite-env-only] Import denied
- Denied by specifier pattern: /^node:/
- Importer: index.html
- Import: "node:fs"
- Environment: client- With the
vite-env-pluginplugin used and enabled in thevite.config.tsfile - This plugin detects unknown imports of
node:fsin an unknown file,index.html
I think the main issue is that the plugin is too old and is no longer maintained for newer versions of Remix.js and ReactRouter.
- Remove the plugin and trust your Intuition to not import server modules into client files :-)