-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with unstable_vitePlugin #161
Comments
Hi @hauptrolle, I'm facing the same issue, I don't know Vite very well but it seems that using : export default defineConfig({
plugins: [remix(), tsconfigPaths()],
ssr: {
noExternal: ["remix-i18next"],
},
}); makes this specific error you are mentioning disappear but introduces another error : TypeError: headers.get is not a function
at Module.getClientLocales (/Users/davo/dev/dials/node_modules/remix-i18next/browser/lib/get-client-locales.js:7:34) I'll keep an eye on this issue to see if someone comes with a good fix. edit: Last error seems to be known and related to : remix-run/remix#7819 |
As a temporary fix, try
|
I'm seeing another issue with remix-i18n where Vite chokes on 10:51:44 AM [vite] Error when evaluating SSR module /node_modules/accept-language-parser/index.js?v=caa3510c:
ReferenceError: module is not defined
at /node_modules/accept-language-parser/index.js?v=caa3510c:73:1
at instantiateModule (/node_modules/vite/dist/node/chunks/dep-6e2fe41e.js:50317:15) |
I was recommended this Vite plugin, see if this solves it for you https://github.com/cyco130/vite-plugin-cjs-interop |
I solved the |
Now I'm seeing this: TypeError: headers.get is not a function
at Module.getClientLocales (/node_modules/remix-i18next/browser/lib/get-client-locales.js:7:34) |
Seems like what's discussed in remix-run/remix#7819 |
I don't have this issue anymore after upgrading remix to Still using this configuration:
|
This seems resolved in the 2.4.0 pre-release of remix/dev however it seems that the Server script returns an error
I see that the Response that is imported does not exist. So without it it runs fine |
As of writing this, the issue is not presenting itself with remix 2.4.0. Seems like it's been fixed and the solution is to upgrade remix. |
It still requires the export default defineConfig({
plugins: [remix(), tsconfigPaths()],
ssr: {
noExternal: ["remix-i18next"],
},
}); |
Describe the bug
When using the new
unstable_vitePlugin
the dev server and build failes with the following error:10:54:31 AM [vite] Error when evaluating SSR module /app/lib/i18n/i18next.server.ts: failed to import "remix-i18next"
Steps to Reproduce the Bug or Issue
Us the new
unstable_vitePlugin
Expected behavior
It does not throw an error.
The text was updated successfully, but these errors were encountered: