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.

nx-plugin: The e2e executor ignores dependsOn

See original GitHub issue

Current Behavior

We have several plugins in our workspace that dependsOn each other. We defined:

"dependsOn": [
        {
          "target": "build",
          "projects": "dependencies"
        }
      ]

to let them build all needed dependencies. That works finde with nx build but doesn’t work in the e2e tests.

Expected Behavior

If defined, all needed packages are built.

Steps to Reproduce

Create two plugins where one depend on each other and try to test it.

For reference: https://github.com/nxext/nx-extensions/tree/package-angular/e2e/angular-e2e

Failure Logs

nx run angular-e2e:e2e

Some of the project angular-nx’s dependencies have not been built yet. Please build these libraries before:

  • angular-vite
  • angular-swc
  • vite

Try: nx run angular-nx:build --with-deps Error at /Users/dominikpieper/Projects/angular/nxext/node_modules/@nrwl/node/src/executors/package/package.impl.js:19:19 at Generator.next (<anonymous>) at /Users/dominikpieper/Projects/angular/nxext/node_modules/tslib/tslib.js:117:75 at new Promise (<anonymous>) at __awaiter (/Users/dominikpieper/Projects/angular/nxext/node_modules/tslib/tslib.js:113:16) at packageExecutor (/Users/dominikpieper/Projects/angular/nxext/node_modules/@nrwl/node/src/executors/package/package.impl.js:13:34) at /Users/dominikpieper/Projects/angular/nxext/node_modules/@nrwl/tao/src/commands/run.js:147:23 at Generator.next (<anonymous>) at /Users/dominikpieper/Projects/angular/nxext/node_modules/tslib/tslib.js:117:75 at new Promise (<anonymous>)

Environment

nx report

NX Report complete - copy this into the issue template

Node : 16.13.1 OS : darwin x64 yarn : 1.22.15

nx : 13.8.3 @nrwl/angular : 13.8.3 @nrwl/cli : 13.8.3 @nrwl/cypress : 13.8.3 @nrwl/detox : undefined @nrwl/devkit : 13.8.3 @nrwl/eslint-plugin-nx : 13.8.3 @nrwl/express : undefined @nrwl/jest : 13.8.3 @nrwl/js : 13.8.3 @nrwl/linter : 13.8.3 @nrwl/nest : undefined @nrwl/next : undefined @nrwl/node : 13.8.3 @nrwl/nx-cloud : 13.1.5 @nrwl/react : 13.8.3 @nrwl/react-native : undefined @nrwl/schematics : undefined @nrwl/storybook : 13.8.3 @nrwl/tao : 13.8.3 @nrwl/web : 13.8.3 @nrwl/workspace : 13.8.3 typescript : 4.5.5 rxjs : 6.6.7

Community plugins: @angular-devkit/build-angular: 13.2.4 @angular/compiler-cli: 13.2.1 @angular/core: 13.2.3 @angular/compiler: 13.2.1 @nrwl/nx-plugin: 13.8.3 @nx-plus/docusaurus: 12.2.0 @nx-plus/vue: 12.2.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
AgentEndercommented, Aug 18, 2022

Hey @chiubaka! Yeah, the nx plugin e2e executor doesn’t provide a ton of extra value, I agree. E2E in general for plugins is something that’s on my list to revisit, its possible that the dependsOn setup should be preferred.

0reactions
DominikPiepercommented, Aug 19, 2022

@AgentEnder with just the Jest executor the tests run pretty fine. For e2e I added our own solution right now, which works a little like the e2e tests from the nrwl repo. We spin up a new workspace, deploy to and install from a local verdaccio instance. I created an executor from that, maybe that’s worth as an alternative to the e2e executor

Read more comments on GitHub >

github_iconTop Results From Across the Web

@nrwl/cypress:cypress | Nx
Run Cypress for e2e, integration and component testing. Options can be configured in project.json when defining the executor, or when invoking it.
Read more >
nrwl/nx-plugin: Versions - Openbase
Full version history for @nrwl/nx-plugin including change logs. ... nx-plugin: thread jest options through nx-plugin:e2e executor (#11442) (4d1acad) ...
Read more >
Renovate Bot Package Diff
executors.json CHANGED ... + "description": "Add a Cypress E2E Project . ... + "description": " The Nx Plugin for Cypress contains executors and...
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