CRA-将反应录制升级到5.0.1 Breaks Storybook
在我的CRA中,我正在使用Storybook 6.4.22版本,我正在使用React-Scripts v 4.0.3,并且已更改为5.0.1版本,但是这打破了故事书。
根据指令,我做过npx sb@next automigrate
,但现在我得到了错误:
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? }, ...]
这只是一些错误。
我知道React-Scripts使用WebPack的版本5,那么与此有关吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论