You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you import a component under the name which doesn't coincide with the filename, it fails to be hydrated because svelteComponent can't find it.
import Comp from "CompLongName.svelte";
<Comp hydrate-client={{}} />
This will give an error:
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received undefined
at new NodeError (internal/errors.js:322:7)
at validateString (internal/validators.js:124:11)
at Module.require (internal/modules/cjs/loader.js:967:3)
at require (internal/modules/cjs/helpers.js:101:18)
at C:\Users\user\src\homepage\node_modules@elderjs\elderjs\build\utils\svelteComponent.js:21:20
When the component name and the corresponding file name have digits, they are trimmed from internal component name
import Comp2test from "Comp2test.svelte";
<Comp2test hydrate-client={{}} />
Internally the name is trimmed to "Comp", so svelteComponent can't find the .svelte file again.
While N1 could be considered a feature (though it's worth noting somewhere on the page), the N2 is definitely a bug (perhaps, regex one)
The text was updated successfully, but these errors were encountered:
Hi.
This will give an error:
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received undefined
at new NodeError (internal/errors.js:322:7)
at validateString (internal/validators.js:124:11)
at Module.require (internal/modules/cjs/loader.js:967:3)
at require (internal/modules/cjs/helpers.js:101:18)
at C:\Users\user\src\homepage\node_modules@elderjs\elderjs\build\utils\svelteComponent.js:21:20
Internally the name is trimmed to "Comp", so svelteComponent can't find the .svelte file again.
While N1 could be considered a feature (though it's worth noting somewhere on the page), the N2 is definitely a bug (perhaps, regex one)
The text was updated successfully, but these errors were encountered: