Yes
Yes. [email protected] [email protected] [email protected]
Error: Cannot find module 'react-error-overlay/middleware'
node -v
: v7.10.1npm -v
: v5.4.1yarn --version
(if you use Yarn): 1.0.0npm ls react-scripts
(if you haven鈥檛 ejected): Then, specify:
(Write your steps here:)
No error
yarn start v1.0.0
$ node scripts/start.js
module.js:472
throw err;
^
Error: Cannot find module 'react-error-overlay/middleware'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
.
.
.
It seems like you've ejected and then bumped major versions of react-error-overlay
& react-dev-utils
, or similar.
It is not expected that you can upgrade these packages beyond their major version once you've ejected -- you need to track the breaking changes and incorporate the changes you've missed since ejecting react-scripts
, or simply leave those dependencies static.
I'll close as it's not a problem with our package, but am more than happy to give you more support if downgrading versions does not resolve this for you.
@xMihai
const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
Also, you need to modify scripts/build.js
like https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/scripts/build.js
hey Jack-works - what do you mean modify build.js
? modify in what way? thank you
I solved this issue by replacing any require of:
react-error-overlay
by react-dev-utils/webpackHotDevClient
react-error-overlay/middleware
by react-dev-utils/errorOverlayMiddleware
Only had to modify config files
Most helpful comment
@xMihai