nx: "@nrwl/cypress:cypress" builder fails when "@nguniversal/builders:ssr-dev-server" is used as the "devServerTarget"
Expected Behavior
I expect to run e2e tests normally with Nx Cypress builder, even when app is using Angular Universal builder.
Current Behavior
The command is failing with the following error:
Schema validation failed with the following errors:
Data path "" should NOT have additional properties(watch).
Failure Information
Steps to Reproduce
- npx create-nx-workspace@latest repro-workspace
- Select “angular” as application to include
- npm run ng add @nguniversal/express-engine
- Change the
devServerTargetoption in@nrwl/cypress:cypresstorepro-workspace:serve-ssr - npm run nx e2e repro-workspace-e2e
Context
NX Report
@nrwl/angular : 9.1.4
@nrwl/cli : 9.1.4
@nrwl/cypress : 9.1.4
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 9.1.4
@nrwl/linter : 9.1.4
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 9.1.4
@nrwl/web : 9.1.4
@nrwl/workspace : 9.1.4
typescript : 3.8.3
Angular
Angular CLI: 9.1.0
Node: 12.13.0
OS: darwin x64
Angular: 9.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router
Ivy Workspace: Yes
@angular-devkit/architect: 0.900.6
@angular-devkit/build-angular: 0.901.0
@angular-devkit/build-optimizer: 0.900.7
@angular-devkit/build-webpack: 0.900.7
@angular-devkit/core: 9.0.6
@angular-devkit/schematics: 9.0.7
@ngtools/webpack: 9.0.7
@nguniversal/builders: 9.0.2
@nguniversal/common: 9.0.2
@nguniversal/express-engine: 9.0.2
@schematics/angular: 9.0.7
@schematics/update: 0.901.0
rxjs: 6.5.4
typescript: 3.8.3
webpack: 4.42.0
If you comment out line 114 in node_modules/@nrwl/cypress/src/builders/cypress/cypress.impl.js, it works. This is happening because watch is not a valid property of the @nguniversal/builders:ssr-dev-server builder. You might want to make extra options configurable as an object and not just the watch property.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 7
- Comments: 36 (3 by maintainers)
Commits related to this issue
- feat(testing): feat(testing): do not always pass watch to cypress dev server target When using a target other than `serve` or `build` do not pass watch. This allows for universal to be used as the de... — committed to yharaskrik/nx by yharaskrik 3 years ago
- fix(core): support target without watch option (#2735) This commit conditionnaly avoid passing the watch option to the dev server target, this is relevant for running Cypress against target that does... — committed to edbzn/nx by edbzn 3 years ago
- fix(core): support target without watch option (#2735) This commit conditionally avoid passing the watch option to the dev server target, this is relevant for running Cypress against target that does... — committed to edbzn/nx by edbzn 3 years ago
- fix(core): support target without watch option (#2735) This commit conditionally avoid passing the watch option to the dev server target, this is relevant for running Cypress against target that does... — committed to edbzn/nx by edbzn 3 years ago
- fix(core): support target without watch option (#2735) This commit checks if the target dev server supports watch option before forward it to, this is relevant for running Cypress against dev server ... — committed to edbzn/nx by edbzn 3 years ago
- fix(core): support target without watch option (#2735) This commit checks if the target dev server supports the watch option before forwarding it to, this is relevant for running Cypress against dev ... — committed to edbzn/nx by edbzn 3 years ago
- fix(core): support target without watch option (#2735) This commit checks if the target dev server supports the watch option before forwarding it to, this is relevant for running Cypress against dev ... — committed to edbzn/nx by edbzn 3 years ago
- fix(core): support target without watch option (#2735) This commit checks if the target dev server supports the watch option before forwarding it to, this is relevant for running Cypress against dev ... — committed to nrwl/nx by edbzn 3 years ago
Still an issue for me.
Still an issue.
@vsavkin Can anybody from nx please take a look at this? We are using universal for every single app of ours and we have many apps. I can try to implement a feature for this if no one from nrwl has the time for it
Just adding a comment as the issue has been marked as stale. The problem is forcing our team to not run the e2e for the universal app during the CI process and manually running, which is obviously counter productive.
This issue has been automatically marked as stale because it hasn’t had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
Still an issue for me.
Can this bot maybe be deactivated after unstaling for several times now? Not really contributing to keeping this issue clean …
Still an issue for me as well.
Hi, I’ve encountered the same issue today, is there any possibility to run universal with
@nrwl/cypress:cypress?