DEV Community

Discussion on: Monorepos: Lerna, TypeScript, CRA and Storybook combined

Collapse
 
shnydercom profile image
Jonathan Schneider

Hi Pedro,
I know it's a bit late, but with the update to react-scripts 4.x and storybook, this error should be gone. It came from a version-mismatch of the babel-loader, because CRA comes with one version, but the older storybook needed another one to function. Storybook has really shortened the list of dependencies it needs to run, and babel-loader is still in the dependency tree, but not explicitly.

Collapse
 
acroyear profile image
Joe Shelby

and today it is back - this time complaining that CRA supports only 8.1 while the one installed was 8.2.2.

Thread Thread
 
shnydercom profile image
Jonathan Schneider

Hi Joe, thanks for pointing that out. I just fixed it by adding a

  "resolutions": {
    "babel-loader": "8.1.0"
  },
Enter fullscreen mode Exit fullscreen mode

to the main package.json. That feature is not so old, and the version needs to be adjusted to the one in the CRA error message. That's unfortunately the situation for now, both storybook and CRA have open issues for that topic. I'm happy to accept Pull Requests or Issues once the version needs to be bumped again =) But I hope the underlying dependency-mismatch gets fixed