Internal error: an internal `assert()` failed
See original GitHub issueError: [vite-plugin-ssr@0.2.0]
[Internal Failure] You stumbled upon a bug in `vite-plugin-ssr`'s source code (an internal `assert()` failed). This should definitely not be happening, and you should create a new GitHub issue at https://github.com/brillout/vite-plugin-ssr/issues/new that includes this error stack (the error stack is usually enough to debug internal errors). Or reach out on Discord. A fix will be written promptly.
at Object.normalizePath (node_modules/vite-plugin-ssr/utils/normalizePath.ts:7:3)
at node_modules/vite-plugin-ssr/html/injectAssets.node.ts:61:36
at Array.map (<anonymous>)
at Object.getPageAssets (node_modules/vite-plugin-ssr/html/injectAssets.node.ts:60:27)
at populatePageContext (node_modules/vite-plugin-ssr/renderPage.node.ts:434:22)
at renderPageId (node_modules/vite-plugin-ssr/renderPage.node.ts:159:3)
at renderPage (node_modules/vite-plugin-ssr/renderPage.node.ts:131:20)
at server/index.ts:53:20
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
INTERNAL ASSERT FAILED error · Issue #75746 - GitHub
While training my CNN for muscle segmentation, I'm running into an error message that affects the stability and predictability of CNN learning.
Read more >3700 Internal error: An assertion failed. - Teradata Database
3700 Internal error: An assertion failed. Explanation: This error occurs only if an inconsistency was detected by the syntaxer.
Read more >INTERNAL ASSERT FAILED: removeWrite called with ...
Hello, I'm getting the below error, causing my Node.js app to fail. I have two questions. 1. Why does this error occur? 2....
Read more >Known Issue: DT140520 - IBM
Internal Error Assertion Failed when assigning in OplScript to a model element a value with an inconsistent type. If the model element is...
Read more >infrun.c:6384: internal-error: void process_event_stop_test ...
A problem internal to GDB has been detected, further debugging may prove unreliable. ... line=6384, fmt=0xe34269 "%s: Assertion `%s' failed.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nice 👌. I added a new docs page https://vite-plugin-ssr.com/i18n.
As for conditional client side dependencies, it’s more a Vite thing so I’ll leave it to the Vite docs which is I believe in a good state in that regard.
I would like to share my findings with anyone who might come across the common issues when adding SSR support to their own site. I will describe my experience while adding SSR support to an early stage production site.
Conditional client side dependencies
Here is how to conditionally import client side dependencies and components.
Combining
vite-plugin-ssr
andssr-window
may be a good temporary drop-in solution if you don’t feel like refactoring everything at once for a large codebase. Some third party libraries may depend on the DOM this way too, likeeditorjs
, and so they do not support SSR unless you include this snippet.SSR language support
When a page is being rendered by the server, a client may specify an
Accept-Language: es
header, a?lang=es
query parameter, a domain TLDdomain.es
, or a path segmentdomain.com/es
. These parameters will control which language the page renders in. This can also be done at build time with a CI script, where each pre-rendered build output goes into its own language “folder”. e.g.domain.com/en/contact
,domain.com/es/contacto
, or they will be deployed onto separate application domains, e.g.domain.com/contact
,domain.es/contacto
. Here is how I added support for this in code.server.ts
types.ts
_default.page.server.tsx