"@nrwl/cypress:cypress" builder fails when "@nguniversal/builders:ssr-dev-server" is used as the "devServerTarget"
See original GitHub issueExpected 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
devServerTarget
option in@nrwl/cypress:cypress
torepro-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.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:35 (3 by maintainers)
Top Results From Across the Web
@nrwl/cypress:cypress | Nx
The baseUrl defined in the Cypress config file is the last value used if no url is found in the devServerTarget or executor...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Still an issue for me.
Still an issue.