- ABP Framework version: 7.0.0-rc.4
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace:
- Steps to reproduce the issue:
I have followed the steps as mentioned in the below document to add a microservice to our solution. I am able to run the application and add entities but the angular components are not generated using the CRUD page generator.
https://docs.abp.io/en/commercial/7.0/startup-templates/microservice/add-microservice
Exception message :
Angular Schematics command failed. file:///Users/abeer/Projects/abp.io/abp.io.7-preview/SchoolAut0mater/apps/angular/.suite/schematics/node_modules/execa/lib/error.js:59 error = new Error(message); ^
Error: Command failed with exit code 1: .suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template microservice-pro --target SchoolAut0mater.CoreService --source /Users/abeer/Projects/abp.io/abp.io.7-preview/SchoolAut0mater/services/core/.suite/entities/AcademicTerm.json Cannot read properties of undefined (reading 'forEach') at makeError (file:///Users/abeer/Projects/abp.io/abp.io.7-preview/SchoolAut0mater/apps/angular/.suite/schematics/node_modules/execa/lib/error.js:59:11) at handlePromise (file:///Users/abeer/Projects/abp.io/abp.io.7-preview/SchoolAut0mater/apps/angular/.suite/schematics/node_modules/execa/index.js:119:26) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async file:///Users/abeer/Projects/abp.io/abp.io.7-preview/SchoolAut0mater/apps/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 microservice-pro --target SchoolAut0mater.CoreService --source /Users/abeer/Projects/abp.io/abp.io.7-preview/SchoolAut0mater/services/core/.suite/entities/AcademicTerm.json', command: '.suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template microservice-pro --target SchoolAut0mater.CoreService --source /Users/abeer/Projects/abp.io/abp.io.7-preview/SchoolAut0mater/services/core/.suite/entities/AcademicTerm.json', escapedCommand: '".suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" --template microservice-pro --target SchoolAut0mater.CoreService --source "/Users/abeer/Projects/abp.io/abp.io.7-preview/SchoolAut0mater/services/core/.suite/entities/AcademicTerm.json"', exitCode: 1, signal: undefined, signalDescription: undefined, stdout: '', stderr: "Cannot read properties of undefined (reading 'forEach')", failed: true, timedOut: false, isCanceled: false, killed: false }
Please find the github repository and documentation below to view the steps and reproduce the issue:
--- removed by gterdem ---
We would like to create a microservice solution with a custom microservice Core and be able to generate angular components for the entities AcademicYear and AcademicTerm. We would then need to regenerate proxies for custom functions created on the server side. We would also need to additionally add lookup components for AcademicTerm. Please let me know the steps for the same and how to resolve the above issue.
8 Answer(s)
-
0
I have removed the link of the project from the public repository. You shouldn't be adding your commercial templates to public repositories which contains information of your credentials.
Please update your repository settings to private.
-
0
I have updated the repository settings. Is there any update or solution available for the above issue ?
-
0
We have the same error on a new projet in 7.0.0-rc.5
<br>
2022-12-22 16:07:40.744 +01:00 [INF] Angular Schematics command failed.
file:///C:/Users/vivie/Desktop/ConfigurationClient/angular/.suite/schematics/node_modules/execa/lib/error.js:59
error = new Error(message);
^
Error: Command failed with exit code 1: .suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template app-pro --target ConfigurateurClient --source C:/Users/vivie/Desktop/ConfigurationClient/aspnet-core/.suite/entities/Etagere.json
Cannot read properties of undefined (reading 'forEach')
at makeError (file:///C:/Users/vivie/Desktop/ConfigurationClient/angular/.suite/schematics/node_modules/execa/lib/error.js:59:11)
at handlePromise (file:///C:/Users/vivie/Desktop/ConfigurationClient/angular/.suite/schematics/node_modules/execa/index.js:119:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///C:/Users/vivie/Desktop/ConfigurationClient/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 app-pro --target ConfigurateurClient --source C:/Users/vivie/Desktop/ConfigurationClient/aspnet-core/.suite/entities/Etagere.json',
command: '.suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template app-pro --target ConfigurateurClient --source C:/Users/vivie/Desktop/ConfigurationClient/aspnet-core/.suite/entities/Etagere.json',
escapedCommand: '".suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" --template app-pro --target ConfigurateurClient --source "C:/Users/vivie/Desktop/ConfigurationClient/aspnet-core/.suite/entities/Etagere.json"',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: '',
stderr: "Cannot read properties of undefined (reading 'forEach')",
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
Node.js v18.12.1
2022-12-22 16:07:40.748 +01:00 [INF] 10/11 - AngularUiGenerateWithSchematicsCommand completed. | Duration: 2116 ms.
-
0
Hello,
We fixed the error the fix will be available in the next version. For now, to avoid this problem, can you update .suite/schematics/package.json with the following? After changing the version of @abp/ng.schematics package, please remove yarn.lock or package-lock.json and reinstall packages with yarn or npm install command in .suite/schematics folder.
"@abp/ng.schematics": "7.0.0-rc.4"
-
0
-
0
Hello,
Can you check with
yarn why @abp/ng.schematics
command in.suite/schematics/
folder? By default, dependencies have~
(tilde) prefix. This means the last patch version of the dependent version. If you don't remove the tilde, npm or yarn will install 7.0.0-rc.5 version -
0
-
0
Hello,
Also, you need to update angular/.suite/schematics/package.json