docz-plugin-css icon indicating copy to clipboard operation
docz-plugin-css copied to clipboard

Bug with React Scripts

Open TimoPurzner opened this issue 6 years ago • 4 comments
trafficstars

If I add this with yarn add docz-plugin-css --dev

I get the error:

The react-scripts package provided by Create React App requires a dependency:

"babel-loader": "8.0.5"

and my App wont start anymore…

so if I take a look with npm ls babel-loader

├─┬ [email protected] │ └─┬ [email protected] │ └── [email protected] ├─┬ [email protected] │ └─┬ [email protected] │ └── [email protected] deduped └─┬ [email protected] └── [email protected]

I see the docz AND the docz-plugin-css uses [email protected] but the error appers only after adding the css plugin

TimoPurzner avatar May 16 '19 16:05 TimoPurzner

I'm also using yarn, so I got to solve this by adding the following to package.json:

  "resolutions": {
      "docz*/**/babel-loader": "8.0.5"
  },

Not the prettiest solution, but works as a workaround. Probably will also have to update this every time react-scripts updates babel-loader on their side...

GabeDuarteM avatar May 25 '19 23:05 GabeDuarteM

the same happens with:

The react-scripts package provided by Create React App requires a dependency:

"webpack": "4.29.6"

With that I added another line:

  "resolutions": {
    "docz*/**/babel-loader": "8.0.5",
    "docz*/**/webpack": "4.29.6"
  },

joohncruz avatar Jun 18 '19 03:06 joohncruz

is there a workaround for npm?

lumcory avatar Aug 20 '19 16:08 lumcory

is there a workaround for npm?

@lumcory should work with npm too. Did not test it jet

TimoPurzner avatar Aug 29 '19 13:08 TimoPurzner