I aim to incorporate my custom executor into the serve operation.
Therefore, I've designed an executor blueprint, with the main function structured as follows:
import { ServeExecutorSchema } from './schema';
import { externalSchematic } from '@angular-devkit/schematics';
export default async function runExecutor(options: ServeExecutorSchema) {
// Implement custom functionality here..
// The remainder remains unchanged.
return externalSchematic('@angular-devkit/build-angular', 'dev-server', {
...options,
});
// console.log('Executor ran for Serve', options);
// return {
// success: true,
// };
}
In the project.json/angular.json file:
"serve": {
"executor": "@app/angular:serve",
"configurations": {...}
Executing the schematics with: nx serve app.
Encountered:
yarn nx serve app
yarn run v1.22.19
$ app/node_modules/.bin/nx serve app
> nx run app:serve:development
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> NX Running target serve for project app failed
Failed tasks:
- app:serve:development
Hint: run the command with --verbose for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
What could be the issue here?