Uncaught ReferenceError: Cannot access 'fromCurrentPageConfig' before initialization

Hi everyone! I've been building a Plasmo extension, and my dev build suddenly started breaking. The build actually finishes, but when I try to run the extension, I get: Uncaught ReferenceError: Cannot access 'fromCurrentPageConfig' before initialization fromCurrentPageConfig is an object I have in my code. Looking at the compiled popup.7d3dc21e.js file, I see this: parcelHelpers.export(exports, "fromCurrentPageConfig", ()=>fromCurrentPageConfig); followed by a compiled version of my CurrentPage.ts, which is where fromCurrentPageConfig is defined. So no wonder it's throwing the error. Does anybody know why this is happening? I have a pretty strict tsconfig and eslint config, and I'm getting no errors anywhere β€” even pnpm dev succeeds. This happened after I added some imports, so there could be some circular import or something going on, but if so, I'm not sure why I'm not getting any errors. If there is a tsconfig option/package that would catch this, that would allow me to move things around such that they work. Appreciate any sort of help with this β€” other than this, Plasmo seems great so far!
1 Reply
Ivanyan 🌴
Ivanyan πŸŒ΄β€’7mo ago
Same error here, Uncaught ReferenceError: Cannot access 'DeepChat' before initialization when I try do import another component
Want results from more Discord servers?
Add your server