question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"@nrwl/cypress:cypress" builder fails when "@nguniversal/builders:ssr-dev-server" is used as the "devServerTarget"

See original GitHub issue

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

  1. npx create-nx-workspace@latest repro-workspace
  2. Select “angular” as application to include
  3. npm run ng add @nguniversal/express-engine
  4. Change the devServerTarget option in @nrwl/cypress:cypress to repro-workspace:serve-ssr
  5. 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:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:35 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
TimoWilhelmcommented, Jan 26, 2021

Still an issue for me.

3reactions
TimoWilhelmcommented, Mar 29, 2021

Still an issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found