-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Storybook starts with NODE_ENV='production' #4942
Comments
@pitops where exactly do you see that? |
@juristr just console logging |
I can confirm this is the case for me as well...
I tried overriding in the
and none of it works... Seems like the base config doesn't even use the
Also, not sure if it's the issue, but storybook only accepts Any ideas on how to bypass/force development mode? I'm currently getting minified react errors that are impossible to debug:
|
@parksj10 as a workaround I did the following in
|
@pitops Thanks! I'll add that for now as well... seems the source is still getting bundled, you know if there's a way to turn that off? |
@parksj10 what do you refer to as |
@pitops the error stacktrace I'm gettting is still referencing bundle (sorry for my faulty nomenclature), perhaps sourceMapping is necessary? I'm still a relative n00b to webpack and the obfuscation of Nx isn't making the process any easier 😄 :
|
ah, probably you mean source maps yes. That's up to you, if you wish to debug in production then yes you need source maps. The error is telling you that probably when you exported a component you imported it using this syntax |
The above error occurred after I implemented your workaround (I.e. forcing to development), which I thought would start yielding the source mapped error output (like I see when I actually run the app in development mode, instead of storybook) |
Well the good news is, it is development mode because the production error you got translates to that in development mode. However, source mapping is not working properly and probably has to do with your webpack config. However, this github issue is not for that, so I suggest you open another issue if you believe it is related to NX. |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
This is issue shouldn't be closed. Please remove these bots. They do more harm than good. |
Same here. In this case, I use Emotion and Storybook reads the wrong runtime. {
"presets": [["@nrwl/react/babel", { "importSource": "@emotion/react" }]],
"plugins": ["@emotion/babel-plugin"]
} if (process.env.NODE_ENV === "production") {
module.exports = require("./emotion-react.cjs.prod.js");
} else {
module.exports = require("./emotion-react.cjs.dev.js");
} |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
I am wondering why storybook starts with a NODE_ENV of
production
instead of development? Also of note that just happened to realise, is that thenx report
command is not listing the@nrwl/storybook
packageThe text was updated successfully, but these errors were encountered: