I have a quite complex monorepo which I recently updated to Yarn 3. With it there where also so updates of the build specific packages like webpack, react-scripts and @craco.craco.
However, I have managed to get it all working but since recently, I get random
The "path" argument must be of type string. Received an instance of Buffer
errors, when running eg. yarn workspace @apps/app1 build. I have noticed that reloading the window in VSCode a couple of times, solves the issue.
What could be the cause of this error? Does anyone else experience similar issues?
Thanks!
Package versions
@craco/craco:v6.4.3webpack:v5.70.0react-scripts:v5.0.0
Found a solution
I'm now using the Provide Plugin and set
in the
webpack.configsection.Note the
.js! This was getting rid of the error.