Description
Is this a bug report?
Yes
Repo demonstrating the problem. It is a a freshly bootstrapped react app. I then installed react-testing-library. The same problem shows if I install enzyme instead.
https://github.com/tmclayson/create-react-app-eslint-plugin-import-error
Yes, tried deleting node_module and package-lock.json.
npm version: 6.8.0-next.2
Have tried multiple different versions however.
Which terms did you search for in User Guide?
I read the Test Utilities page, but the both the both suggestions for enzyme and react-testing-library failed for me. I've tried installing the package individually, but then something else is missing.
Environment
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz
Binaries:
Yarn: 1.13.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.8.0-next.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 42.17134.1.0
npmPackages:
react: ^16.8.1 => 16.8.1
react-dom: ^16.8.1 => 16.8.1
react-scripts: 2.1.3 => 2.1.3
npmGlobalPackages:
create-react-app: Not Found
Steps to Reproduce
- npx create-react-app testing
- npm install --save-dev react-testing-library
- npm start
Expected Behavior
Compile and load the base react app without issues.
Actual Behavior
Starting the development server...
Failed to compile.
./src/index.js
Error: Failed to load plugin import: Cannot find module 'eslint-plugin-import'
Referenced from:
at Array.forEach ()
at Array.reduceRight ()
Reproducible Demo
https://github.com/tmclayson/create-react-app-eslint-plugin-import-error
npm start