You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.
If you have started to read the ebook before the 4th edition was released, but grabbed the 4th edition recently (which uses React 16), you may see the following command line error message when executing your Jest tests for the first time:
FAIL src/App.test.js
● Test suite failed to run
TypeError: Cannot read property 'ReactCurrentOwner' of undefined
at node_modules/react-test-renderer/cjs/react-test-renderer.development.js:621:36
at Object.<anonymous> (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:8254:3)
at Object.<anonymous> (node_modules/react-test-renderer/index.js:6:20)
at Object.<anonymous> (src/App.test.js:3:26)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.656s
You need to upgrade your project to React 16. Check your package.json if you run an old version of React. If you do so, type the following on the command line:
npm i -g npm-check-updates
npm-check-updates -u
npm install
It is a global npm module that can be used to update your dependencies, such as react or react-dom, in your package.json file. I should’ve mentioned it in the first place, for people grabbing the new edition who have an old React version installed.
If you have started to read the ebook before the 4th edition was released, but grabbed the 4th edition recently (which uses React 16), you may see the following command line error message when executing your Jest tests for the first time:
You need to upgrade your project to React 16. Check your package.json if you run an old version of React. If you do so, type the following on the command line:
It is a global npm module that can be used to update your dependencies, such as react or react-dom, in your package.json file. I should’ve mentioned it in the first place, for people grabbing the new edition who have an old React version installed.
See also #84
The text was updated successfully, but these errors were encountered: