Describe the bug
Getter of default webpack config is broken. require.resolve throws an error if a file doesn't exist.
Try to wrap it into try...catch block or just remove it.
https://github.com/storybooks/storybook/blob/next/app/react/src/server/cra-config.js#L87
To Reproduce
Steps to reproduce the behaviour:
Cannot find module: webpack.config.devExpected behaviour
No error
System:
I've discovered that create-react-app now using [email protected] where they merged webpack.config.dev.js and webpack.config.prod.js into single file webpack.config.js
https://github.com/facebook/create-react-app/commit/30ee52cf3b2cbb6ac70999c02b1196bcaba8d4ca#diff-ee7ca784a2ec9d96668503d6394bdd62
Thanks @appbak3r. In the interim, you can downgrade to [email protected] while we resolve this.
We, the CRA team, made this change a while ago, and @igor-dv made a fix for this, but there was a small bug which is what my PR aims to resolve.
w00t!! I just released https://github.com/storybooks/storybook/releases/tag/v4.2.0-alpha.7 containing PR #5074 that references this issue. Upgrade today to try it out!
Because it's a pre-release you can find it on the @next NPM tag.
Closing this issue. Please re-open if you think there's still more to do.
Hurrah!! I just released https://github.com/storybooks/storybook/releases/tag/v4.1.4 containing PR #5074 that references this issue. Upgrade today to try it out!
In case someone else comes here having problems with the latest storybook combined with react-scripts < 2.1.2 on windows, @simonbuchan pointed out in the PR that this fix is incompatible with the aforementioned combination, but simply upgrading react-scripts should fix your problem.
Most helpful comment
Hurrah!! I just released https://github.com/storybooks/storybook/releases/tag/v4.1.4 containing PR #5074 that references this issue. Upgrade today to try it out!