Closed AmirL closed 2 months ago
I've also had this issue and I fixed it by changing the build command for storybook in my package.json
:
{
"scripts": {
"build-storybook": "NODE_ENV=development storybook build -o build/storybook/",
}
}
Chromatic seemed to respect that.
Awesome, it works! Thank you @rChaoz!
Describe the bug
My storybook renders well when NODE_ENV is
development
, but it fails when it'sproduction
. (Mock functions obviously don't work in the production mode). There is option for NODE_ENV in the GitHub action:STORYBOOK_NODE_ENV
, but I don't see any mentions of such option for the addon. anTo reproduce
Just try to write a storybook that fails in production mode (throw an error, for example, depends on NODE_ENV).
Environment
Node v18.17.1