create-react-app failed to compile
See original GitHub issueCurrent behavior:
When npm install @emotion/core
and/or @emotion/styled
after setting up a typescript project with create-react-app
the app failed to compile even though I didn’t import emotion in the project.
To reproduce:
- npx create-react-app vz-app --template typescript
- npm install --save @emotion/core @emotion/styled
Expected behavior:
Should render the create-react-app
landing page correctly.
Environment information:
react
version: 16.12.0@emotion/styled
version: 10.0.23
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
create-react-app "Failed to compile" on start up - Stack Overflow
I'm new to React and I have had no problems the past few days doing the command line to make a new app....
Read more >Why my React App Failed To Compile - Timonwa's Notes
Bugs and Errors will come in different shapes and sizes, styles and formats you never expect, causing your react app not to compile....
Read more >react-scripts fails to build project with Node 17 #11562 - GitHub
Describe the bug we have a CRA app, it used to build with Node 14.x very fine, today I upgrade nodejs to 17.0.0...
Read more >"Failed to compile" error for any eslint error. i would like to not ...
I will assume you're using create-react-app. If you really want to disable eslint put “DISABLE_ESLINT_PLUGIN=true” in a .env file at your ...
Read more >Troubleshooting - Create React App
Check that your file is imported by your entrypoint. TypeScript will show errors on any of your source files, but webpack only reloads...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this just is caused by a fact that you install extra dependencies with npm, while the existing node_modules has been created with yarn. It’s some kind of a mismatch between those 2 installs - if I remove all node_modules & lock files and do a fresh
npm install
(which includes already added emotion dependencies) then everything works OK.npm i @types/react
andnpm i @types/react-dom
removing the error.