Skip to content
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

[Bug]: variables are used before they are defined. #29995

Open
yhyuan opened this issue Dec 9, 2024 · 0 comments
Open

[Bug]: variables are used before they are defined. #29995

yhyuan opened this issue Dec 9, 2024 · 0 comments

Comments

@yhyuan
Copy link

yhyuan commented Dec 9, 2024

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @storybook/[email protected] for the project I'm working on.

When I load the Docs page for my storybook, I run into an error that variables are accessed before they defined. I found simple patch can address this issue. I hope it will help you narrow down the issue and solve it.

Here is the diff that solved my problem:

diff --git a/node_modules/@storybook/core/dist/theming/index.js b/node_modules/@storybook/core/dist/theming/index.js
index 5a8b0a9..4783d46 100644
--- a/node_modules/@storybook/core/dist/theming/index.js
+++ b/node_modules/@storybook/core/dist/theming/index.js
@@ -1806,11 +1806,11 @@ var Ia = /* @__PURE__ */ a(function(r) {
   }), u);
 });
 Yt.displayName = "EmotionClassNames";
+var wr, Ut, Sr, Or;
 wr = !0, Ut = typeof jest < "u" || typeof vi < "u", wr && !Ut && (Sr = // $FlowIgnore
 typeof globalThis < "u" ? globalThis : wr ? window : global, Or = "__EMOTION_REACT_" + Aa.version.split(".")[0] + "__", Sr[Or] && console.warn(
 "You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versio\
 ns are used, or if multiple builds of the same version are used."), Sr[Or] = !0);
-var wr, Ut, Sr, Or;
 
 // ../node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js
 var ka = sr, Pa = /* @__PURE__ */ a(function(r) {

This issue body was partially generated by patch-package.

@yhyuan yhyuan changed the title variables are used before they are defined. [Bug] variables are used before they are defined. Dec 9, 2024
@yhyuan yhyuan changed the title [Bug] variables are used before they are defined. [Bug]: variables are used before they are defined. Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant