cleanup(react): improved error message throwed when executor is not available or not valid (#23282)
The error message which is throwed when executer is not available or not valid is really confusing. Hence updating it to throw the exact issue why it errored. <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior The error message throwed is really vauge. And does't really tell anything about why it happened. Fixes # Improved error message which is throwed when excuter is not valid or not present in the project.json <img width="1421" alt="Screenshot 2024-05-10 at 1 17 05 AM" src="https://github.com/nrwl/nx/assets/54993680/455163e4-3197-419c-b511-040c35784a72">
This commit is contained in:
parent
89ed6b12aa
commit
eb44f9b07e
@ -50,7 +50,9 @@ export async function configureCypressCT(
|
||||
const executor = buildTargetProject.targets?.[target]?.executor;
|
||||
if (!executor || !options.validExecutorNames.has(executor)) {
|
||||
throw new Error(
|
||||
`Cypress Component Testing is not currently supported for this project. Please check https://github.com/nrwl/nx/issues/21546 for more information.`
|
||||
`Cypress Component Testing is not currently supported for this project. Either 'executer' is not defined in '${target} target' of '${project} project.json' or executer present is not valid one. Valid ones are ${JSON.stringify(
|
||||
[...options.validExecutorNames]
|
||||
)}. Please check https://github.com/nrwl/nx/issues/21546 for more information.`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user