4.0.0-next.77 sample app yields "Module not found: Your application tried to access react-refresh" when started with Yarn 2
See original GitHub issueDescribe the bug
create-react-app@4.0.0-next.77
yields “Module not found: Your application tried to access react-refresh, but it isn’t declared in your dependencies; this makes the require call ambiguous and unsound.” after running yarn start
with Yarn 2. Installing react-refresh
as dependency solves the problem, tho.
Environment
Environment Info:
current version of create-react-app: 4.0.0-next.77
running from /Users/v.kushnir/.npm/_npx/57508/lib/node_modules/create-react-app
System:
OS: macOS 10.15.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 12.16.3 - /usr/local/bin/node
Yarn: 2.1.1 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Browsers:
Chrome: 84.0.4147.105
Edge: Not Found
Firefox: Not Found
Safari: 13.1.2
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
npx create-react-app@next --scripts-version=@next --template=cra-template@next my-js-app
cd my-js-app
yarn set version berry
yarn set version latest
yarn install
yarn start
Expected behavior
App is served without problems.
Actual behavior
App throws an error.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Module not found error using Yarn 2 to link React components
However, when I run the React app using yarn start I get the following error: ./src/App.tsx Module not found: Your application tried to...
Read more >Troubleshooting | Yarn
Cannot find module <require-path>. This error message is not generated by Plug'n'Play. Ever. If you get it, it very likely means that your...
Read more >yarn install peer dependencies automatically - You.com
When you code is running, you will get a bizarre error that function was not found or undefined. This is the problem that...
Read more >Yarn 3.0 - Hacker News
I used to use yarn all the time until I tried pnpm. ... NPM has not caught up with Yarn 2, but Yarn...
Read more >[FIXED] Yarn error on bench update - ERPNext Forum
Hi there, getting an error on bench update in production (CentOS 7): $ sudo bench update npm WARN deprecated yarn@1.3.2: It is recommended ......
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
So crazy story. Do
npm install
and then try starting it again. To me, that seems like a bug in Yarn2Bump - I think I’ll proceed on making a PR to push further discussions.