When I try to Save and generate the following model, the frontend Angular UI generation fails to generate/update my Angular UI. Checking the logs output shows that the step is failing due to some sort of error in the .suite\schematics program.
Version:
- Latest ABP Studio 1.0.0 (June 11, 2025)
- ABP project and ABP project module all using latest 9.2.0 version
What I've tried:
- I have also tried clearing the .suite folder so that ABP Suite pulls in a new copy but the issue persists. Note that the package.json of the .suite schematics is:
"name": "@volo/abp.ng.suite", "version": "9.2.0-rc.3",
- I have also manually removed each property and navigation property in the affected model (PurchaseOrder) and then manually re-added it in case the entity .json file was malformed but the same result occurs.
PurchaseOrder.json generated by ABP Studio here: https://pastebin.com/CHpftErb
- Exception message and full stack trace:' From ABP Suite Logs output:
2025-06-11 18:38:42.090 -06:00 [INF] 10/10 - AngularUiGenerateWithSchematicsCommand started...
2025-06-11 18:39:06.234 -06:00 [INF] Running the Angular Schematics command:
node run-schematics.mjs "C:/git/fabwerx/Fabwerx/modules/core/angular/.suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" module-pro Core "C:/git/fabwerx/Fabwerx/modules/core/.suite/entities/PurchaseOrder.json" "C:/git/fabwerx/Fabwerx/modules/core/angular"
2025-06-11 18:39:09.500 -06:00 [INF] Angular Schematics command failed.
C:\git\fabwerx\Fabwerx\modules\core\angular\.suite\schematics\node_modules\execa\lib\error.js:60
error = new Error(message);
^
Error: Command failed with exit code 1: .suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template module-pro --target Core --source C:/git/fabwerx/Fabwerx/modules/core/.suite/entities/PurchaseOrder.json
[1m[31mCannot read properties of undefined (reading 'replace')[39m[22m
at makeError (C:\git\fabwerx\Fabwerx\modules\core\angular\.suite\schematics\node_modules\execa\lib\error.js:60:11)
at handlePromise (C:\git\fabwerx\Fabwerx\modules\core\angular\.suite\schematics\node_modules\execa\index.js:118:26)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async file:///C:/git/fabwerx/Fabwerx/modules/core/angular/.suite/schematics/run-schematics.mjs:6:20 {
shortMessage: 'Command failed with exit code 1: .suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template module-pro --target Core --source C:/git/fabwerx/Fabwerx/modules/core/.suite/entities/PurchaseOrder.json',
command: '.suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template module-pro --target Core --source C:/git/fabwerx/Fabwerx/modules/core/.suite/entities/PurchaseOrder.json',
escapedCommand: '".suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" --template module-pro --target Core --source "C:/git/fabwerx/Fabwerx/modules/core/.suite/entities/PurchaseOrder.json"',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: '',
stderr: "\x1B[1m\x1B[31mCannot read properties of undefined (reading 'replace')\x1B[39m\x1B[22m",
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
Node.js v22.16.0
2025-06-11 18:39:09.664 -06:00 [INF] 10/10 - AngularUiGenerateWithSchematicsCommand completed. | Duration: 27573 ms.
2025-06-11 18:39:09.664 -06:00 [INF] Entity generation completed in 37 sec.
2025-06-11 18:39:09.666 -06:00 [INF] Executing StatusCodeResult, setting HTTP status code 204
2025-06-11 18:39:09.666 -06:00 [INF] Executed action Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite) in 38039.4525ms
2025-06-11 18:39:09.666 -06:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite)'
2025-06-11 18:39:09.666 -06:00 [INF] Request finished HTTP/1.1 POST http://localhost:3000/api/abpSuite/crudPageGenerator/f7fcb191-bd0b-4ce2-bd24-dba3e4b7eb80/save-and-generate-entity - 204 null null 38043.1748ms
- Steps to reproduce the issue:
- Open module in ABP Suite
- Go to PurchaseOrder model
- Click Save and Generate
- Check changed files to see that Angular UI is not generated and confirm by looking at ABP Suite Log output for error that the generation fails in step 10/10
10 Answer(s)
-
0
The error
Cannot read properties of undefined (reading 'replace')
during Angular UI code generation in ABP Suite typically indicates a problem with the entity JSON file or a mismatch in the expected structure for the code generator.For ABP 9.2.0 and ABP Studio/Suite 1.0.0, ensure the following for Angular UI code generation:
- Your
PurchaseOrder.json
entity file must strictly follow the expected schema. Even a minor formatting or property issue can cause the schematics to fail. - The
rootNamespace
must be correctly set in your Angular environment configuration as described in the documentation. - Your Angular workspace configuration (project key, default project, etc.) must match the requirements. See the troubleshooting section in the official docs.
- All navigation properties and enums referenced in the entity must exist and be valid.
- Your
Steps to resolve:
- Double-check the
PurchaseOrder.json
for any missing or extra fields, especially in navigation properties and enums. - Ensure your Angular project’s
environment.ts
includes the correctrootNamespace
underapis.default
. - Verify your
tsconfig.base.json
includes the correct@proxy
paths. - If you have recently upgraded ABP Suite or the project, delete the
.suite
folder in your Angular project and let Suite regenerate it. - If the error persists, try generating a CRUD page for a very simple entity (e.g., with only a string property) to isolate if the issue is with the entity definition or the environment.
- Double-check the
If you continue to encounter this error with a valid entity file and environment, it may be a bug in the current version of the ABP Suite schematics. In that case, report the issue with your entity JSON and environment details to the ABP support team.
Sources:
- https://abp.io/docs/latest/suite/generating-crud-page
- https://abp.io/docs/latest/framework/ui/angular/service-proxies
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
-
0
Just writing to follow up on the AI response that I've already tried deleting the .suite folder and re-generated the PurchaseOrder.json from scratch. The other steps don't apply yet as the error is occurring at generation step and not within the Angular project/output itself.
I just tried paring down the PurchaseOrder.json but the generation step still fails even with a single field in it.
-
0
Hello, thank you for providing these details.
Unfortunately, I’m unable to access the JSON file at https://pastebin.com/CHpftErb, so I can’t reproduce the issue on my end.
Additionally, this version should have been updated to 9.0.0 with the latest release.
I’ve also tried clearing the .suite folder to force ABP Suite to fetch a fresh copy, but the issue still persists. For reference, the package.json of the .suite schematics currently shows:
"name": "@volo/abp.ng.suite", "version": "9.2.0-rc.3",
-
0
Hello again, Thank you for sharing the related JSON file. However, I wasn’t able to reproduce the issue on my end.
I recommend updating your Suite version to the stable release 9.2.0, as that might resolve the problem. If the issue persists, I can provide you with a .suite file that may help troubleshoot further.
Please let me know if you'd like me to share that or if you need any additional assistance.
-
0
Hi Sumeyee, I've done a switch to stable on each the main project and subprojects so that they're all using ABP Volo packages of 9.2.0
I tried deleting the schematics folder in the .suite folder in the module project, rebuilt the solution in VS as well, and then clicked "save and generate" and the same error still occurs.
The package.json of the schematics still shows up as the following though:
"name": "@volo/abp.ng.suite", "version": "9.2.0-rc.3",
Any way to get this on 9.2.0 instead of the rc.3 version? I also updated ABP Studio from 1.0.0 to 1.0.1 which was released just today (June 13).
Alternatively, is there a way I can privately send our project to see if you can reproduce the error on your side?
-
0
Hello,
To change the version, please click on
Abp Suite
located in the top-left corner. In the dropdown menu, you'll find an option to switch versions. Select the stable version9.2.0
from the list and update your suite accordingly.If you encounter any issues or the version change does not work, feel free to send me a sample project at sumeyye.kurtulus@volosoft.com, and I will be glad to assist you further.
-
0
-
0
Thank you for taking the time to send over the example. I look forward to receiving the email.
-
0
Hi Sumeyee, I've now sent over an example to your inbox. Thanks for taking the time to review our issue.
-
0
Hello David, I’ve just sent my reply. Thank you for your continued cooperation.