Reputation: 34071
I am trying to use @cypress/react and I followed the installation instructions. In addition, I have also installed Cypress Testing Library to use Testing Library extensions for Cypress.
When the cypress is started, I have got the following error messages:
./node_modules/@cypress/react/support/index.js
Module not found: Error: Can't resolve 'cypress-react-selector' in '/home/developer/project/example/webapp/board-ui/node_modules/@cypress/react/support'
resolve 'cypress-react-selector' in '/home/developer/project/example/webapp/board-ui/node_modules/@cypress/react/support'
Parsed request is a module
using description file: /home/developer/project/example/webapp/board-ui/node_modules/@cypress/react/package.json (relative path: ./support)
Field 'browser' doesn't contain a valid alias configuration
Looked for and couldn't find the file at the following paths:
[/home/developer/project/example/webapp/board-ui/node_modules/@cypress/react/support/node_modules]
[/home/developer/project/example/webapp/board-ui/node_modules/@cypress/node_modules]
Do I have to install cypress-react-selector?
Upvotes: 3
Views: 2233
Reputation:
You can just install the missing package cypress-react-selector.
npm i --save cypress-react-selector
I'm not sure if it's supposed to be installed with @cypress/react or Cypress Testing Library, if so it would be worthwhile reinstalling those and watch out for error messages during the install.
Upvotes: 3