Jean-Marc Le Roux
Jean-Marc Le Roux
The `ReferenceError: Cannot access '__WEBPACK_DEFAULT_EXPORT__' before initialization` error usually points at a circular dependency error: - https://stackoverflow.com/questions/65038253/uncaught-referenceerror-cannot-access-webpack-default-export-before-initi - https://stackoverflow.com/questions/64396536/vue-cannot-access-webpack-default-export-when-reference-a-components Yet the exact same code runs just fine using `keystone dev`.
It does *not* happen after creating a fresh app with `yarn create keystone-app` though. So the problem might be in my code.
I have commented each schema one by one to see which one could cause a circular dependency. After finally gradually uncommenting each of them, I cannot reproduce the error and...
The same error finally popped again after editing nothing but `auth.js` to set `process.env.SESSION_SECURE == "true"`. ```diff diff --git a/app/auth.ts b/app/auth.ts index 48569a6..8733f8f 100644 --- a/app/auth.ts +++ b/app/auth.ts @@ -53,6...
> I think the problem is trying to build/run a production build with NODE_ENV not actually set to "production". Nope. That's not it.
> That's due to the way the errors are done in Tera, changing that would be a breaking change but it should be improved for the next major version. @Keats...
@Keats my bad, here we go again: https://github.com/Keats/tera/blob/4f6b354185e1f041aef5a4a6e42451d5cc348668/src/errors.rs#L69
@Keats any chance you can have a look at this? Because of this bug `super()` is pretty much unusable IMHO. Let us know how we can help!
> I would recommend putting the condition in the block for now @Keats thank you for you answer. But that means it is impossible to have conditional blocks and use...
@Keats thanks a million for the details. The thing is that is makes extending templates very tidious: - Either all `if` have to be inside blocks/there cannot be blocks inside...