Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(devkit): improving error handeling read target options #20336

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

wout-junius
Copy link
Contributor

Catching a wrong target given in the project.json for component testing.

closed #20251

Current Behavior

When running a Cypress component test with a wrong target it will error with an unclear error:

TypeError: Cannot read properties of undefined (reading 'executor')
    at readTargetOptions (/[PATH TO]/node_modules/@nx/devkit/src/executors/read-target-options.js:24:60)
    etc...

Expected Behavior

With this fix, it should catch when the executor is not found and throw a clear error saying that the target is not found on the project. This makes it clearer what the error is about

Related Issue(s)

Fixes #20251

(This is a re-opening of This PR since something went wring formatting and it closed it)

@wout-junius wout-junius requested a review from a team as a code owner November 19, 2023 11:29
Copy link

vercel bot commented Nov 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2024 5:46pm

@wout-junius
Copy link
Contributor Author

Sorry @AgentEnder I accidentally pushed 700+ file changes in my previous PR and reverted that commit concluding to it closing my PR

Catching a wrong target given in the project.json for component testing.

closed nrwl#20251
@mandarini mandarini enabled auto-merge (squash) January 30, 2024 18:05
@mandarini mandarini merged commit 946c6a7 into nrwl:master Jan 30, 2024
6 checks passed
FrozenPandaz pushed a commit that referenced this pull request Jan 31, 2024
Copy link

github-actions bot commented Feb 5, 2024

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve Error handeling of cypress component testing target is wrong
3 participants