In my CRA, I am using storybook version 6.4.22, I was using react-scripts v 4.0.3 and have changed to version 5.0.1 however this has broken the storybook.
As per the instructions I did npx sb@next automigrate but now I get the error:
ERR! ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
ERR! - configuration.module.rules[4] should be one of these:
ERR! ["..." | object { assert?, compiler?, dependency?, descriptionData?, enforce?, exclude?, generator?, include?, issuer?, issuerLayer?, layer?, loader?, mimetype?, oneOf?, options?, parser?, realResource?, resolve?, resource?, resourceFragment?, resourceQuery?, rules?, scheme?, sideEffects?, test?, type?, use? }, ...]
This is just some of the errors.
I know react-scripts uses version 5 of webpack, so must be something to do with that?