create-react-app: Module not found: Can't resolve '../components/Overlay' on starting server
Is this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
I’m using yarn 0.27.5
Which terms did you search for in User Guide?
N/A
Environment
node -v
: v8.2.1npm -v
: 5.3.0yarn --version
(if you use Yarn): 0.27.5npm ls react-scripts
(if you haven’t ejected): 1.0.12
Then, specify:
- Operating system: Mac OS X 10.12.6
- Browser and version (if relevant):
Steps to Reproduce
- run
dotenv npm run start
Expected Behavior
Server starts running.
Actual Behavior
Receive the following error:
Failed to compile.
./node_modules/react-error-overlay/lib/containers/CompileErrorContainer.js
Module not found: Can't resolve '../components/Overlay' in '/Users/jason/nob/messages-frontend-prototype/node_modules/react-error-overlay/lib/containers'
Reproducible Demo
None at the moment.
Note: Downgrading to react-scripts 1.0.11 works great.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 21 (8 by maintainers)
The issue is because we replaced
overlay.js
withOverlay.js
, and FS gets confused. Let’s just completely rename this file to something else. e.g.ErrorOverlay.js
.Can you run
and try again?
After upgrading to react@16.0 this issue arises to me as well.
@balazsorban44 if you’ve already ejected perhaps try rolling back
react-error-overlay
to an older version…"react-error-overlay": "^1.0.10"
works for meThis should be fixed in 1.0.13. Please verify.
https://github.com/facebookincubator/create-react-app/releases/tag/v1.0.13
I’ve had something similar happening with a project attempting a react 16 upgrade - getting the following error:
I’ve tried deleting
node_modules
and clearing npm cache without any luck.Doing some research around that error (like this one) it looks like there might still be a 16 incompatibility with that module, but the package itself should support it just fine.
I just tried everything posted here, and nothing works! My project was ejected with react eject. Can it be a problem? I get this error at running yarn start:
@gaearon That does fix the issue. But
yarn upgrade react-scripts
should have worked fine right?