-
-
Notifications
You must be signed in to change notification settings - Fork 284
Cannot access 'internals' before initialization #329
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
Comments
This is also baffling me. I discovered you can fix it by monkey patching const defaults = Object.assign({}, {
class: '',
classMap: {},
contexts: {},
props: {}}) But I've frankly got no clue on why it doesn't work out of the box |
At least the explanation for why a [TDZ] Temporal Dead Zone: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz |
I have no idea why this happened, but at least downgrade to 4.2.0 would be a workaround. |
I think I've figured this out. I'm moving internals back into the Svelte components and just ignoring the TS error about it not being exported. It is exported. |
@hperrin I'm still getting the same issue on beta.6 :( |
me too, but i have another situation. this is a sveltekit-nwjs app, so i wouldn't wonder. But sometimes - if i rearrange my imports - the error goes away. next time i'm adding an import: boom. |
how do you monkeypatch this? |
I didn't figure it out... Sorry to give you false hope yesterday, @Serjlee. xD |
I have no idea why this issue doesn't appear all the time. Very strange. |
I really don't know why it's so unstable in it's errors. But i messed up my package.json an therefore deleted all modules and reinstalled with latest and boom. It works. I'm sorry. My best gess it's been the svelte-kit package which caused all the trouble. The error always occurred in Button.js which was the first one imported in my project.. |
Well, once I release this newest change, that should fix it permanently. |
Ok, the latest version should fix this permanently. |
I can confirm it works fine with beta.7, thanks a lot! |
Describe the bug
I'm trying to have a simple Textfield component loading on a page. It however throws the following error after a quick second of rendering it correctly. This also only occurs when running
npm run dev
and not when doing a fullnpm run build && npm run preview
. The provided output is rather sparse:To Reproduce
Steps to reproduce the behavior:
npm init svelte@next test
(chose typescript support)cd test
npm install
npm install --save-dev @smui/textfield smui-theme
npm run dev
Expected behavior
The component should display normally as a text field.
Desktop (please complete the following information):
Additional context
This is the content of my index.js file for the textfield component:
The text was updated successfully, but these errors were encountered: