I was trying to setup and run nx tests for an established nx.dev angular application.
When I run nx e2e app-name-e2e
I get the error:
Cannot find module 'cypress/package.json'
Require stack:
- C:\repos\MyConnect2\src\Frontend\myconnect2\node_modules\@nrwl\cypress\src\utils\cypress-version.js
- C:\repos\MyConnect2\src\Frontend\myconnect2\node_modules\@nrwl\cypress\src\executors\cypress\cypress.impl.js
- C:\repos\MyConnect2\src\Frontend\myconnect2\node_modules\@nrwl\tao\src\shared\workspace.js
- C:\repos\MyConnect2\src\Frontend\myconnect2\node_modules\@nrwl\tao\src\commands\run.js
- C:\repos\MyConnect2\src\Frontend\myconnect2\node_modules\@nrwl\tao\index.js
- C:\repos\MyConnect2\src\Frontend\myconnect2\node_modules\@nrwl\cli\lib\run-cli.js
e2e tests were never used on this app, so configuration errors are not excluded (as the app had a few upgrades along the way, and e2e config might not have been maintained correctly).
This is running with angular v11.2 (and nx v 11.2), configured with default cypress for this nx.dev version