Open Closed

Code is generated for me. but angular UI component not generated #3344


User avatar
0
vipulbuoyancy created

eCheck the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.2.2
  • 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:"

Hello,

Code is generated for me. but angular UI component not generated

.abp\suite\logs

2022-06-28 17:45:56.964 +05:30 [INF] 1/10 - EntityGenerateCommand started...
2022-06-28 17:45:59.430 +05:30 [INF] 1/10 - EntityGenerateCommand completed. | Duration: 2465 ms.
2022-06-28 17:45:59.430 +05:30 [INF] 2/10 - RepositoryCommand started...
2022-06-28 17:45:59.926 +05:30 [INF] 2/10 - RepositoryCommand completed. | Duration: 493 ms.
2022-06-28 17:45:59.926 +05:30 [INF] 3/10 - ManagerCommand started...
2022-06-28 17:45:59.955 +05:30 [INF] 3/10 - ManagerCommand completed. | Duration: 29 ms.
2022-06-28 17:45:59.956 +05:30 [INF] 4/10 - AppServiceCommand started...
2022-06-28 17:46:00.135 +05:30 [INF] 4/10 - AppServiceCommand completed. | Duration: 179 ms.
2022-06-28 17:46:00.135 +05:30 [INF] 5/10 - ProxyControllerCommand started...
2022-06-28 17:46:00.155 +05:30 [INF] 5/10 - ProxyControllerCommand completed. | Duration: 19 ms.
2022-06-28 17:46:00.155 +05:30 [INF] 6/10 - PermissionCommand started...
2022-06-28 17:46:00.208 +05:30 [INF] 6/10 - PermissionCommand completed. | Duration: 52 ms.
2022-06-28 17:46:00.209 +05:30 [INF] 7/10 - ApplicationObjectMappingCommand started...
2022-06-28 17:46:00.250 +05:30 [INF] 7/10 - ApplicationObjectMappingCommand completed. | Duration: 40 ms.
2022-06-28 17:46:00.250 +05:30 [INF] 8/10 - UnitTestCommandCommand started...
2022-06-28 17:46:00.359 +05:30 [INF] 8/10 - UnitTestCommandCommand completed. | Duration: 109 ms.
2022-06-28 17:46:00.359 +05:30 [INF] 9/10 - AngularUiGenerateWithSchematicsCommand started...
2022-06-28 17:46:00.371 +05:30 [INF] Running the Angular Schematics command:
npx "D:/Projects/UBX/angular/.suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" app-pro UBX_Client_Angular "D:/Projects/UBX/aspnet-core/.suite/entities/VSPCUser.json"
2022-06-28 17:46:05.374 +05:30 [INF] Angular Schematics command failed.
An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID
See "C:\Users\BUOYAN~1\AppData\Local\Temp\ng-7quWKa\angular-errors.log" for further details.

2022-06-28 17:46:05.380 +05:30 [INF] 9/10 - AngularUiGenerateWithSchematicsCommand completed. | Duration: 5020 ms.
2022-06-28 17:46:05.380 +05:30 [INF] 10/10 - DbMigrationCommand started...
2022-06-28 17:46:05.381 +05:30 [INF] Adding new migration...
2022-06-28 17:46:05.381 +05:30 [INF] cd /d "D:\Projects\UBX\aspnet-core\src\UBX_Client_Angular.EntityFrameworkCore" && dotnet ef migrations add Added_VSPCUser --startup-project ../UBX_Client_Angular.HttpApi.Host --output-dir Migrations --context UBX_Client_AngularDbContext
2022-06-28 17:48:04.063 +05:30 [ERR] Build started...
Build failed. Use dotnet build to see the errors.

Local\Temp\ angular-error log

[error] Error: NOT SUPPORTED: keyword "id", use "$id" for schema ID
at Object.code (D:\Projects\UBX\angular\node_modules@angular\cli\node_modules\ajv\dist\vocabularies\core\id.js:6:15)
at keywordCode (D:\Projects\UBX\angular\node_modules@angular\cli\node_modules\ajv\dist\compile\validate\index.js:454:13)
at D:\Projects\UBX\angular\node_modules@angular\cli\node_modules\ajv\dist\compile\validate\index.js:222:17
at CodeGen.code (D:\Projects\UBX\angular\node_modules@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:439:13)
at CodeGen.block (D:\Projects\UBX\angular\node_modules@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:568:18)
at iterateKeywords (D:\Projects\UBX\angular\node_modules@angular\cli\node_modules\ajv\dist\compile\validate\index.js:219:9)
at groupKeywords (D:\Projects\UBX\angular\node_modules@angular\cli\node_modules\ajv\dist\compile\validate\index.js:208:13)
at D:\Projects\UBX\angular\node_modules@angular\cli\node_modules\ajv\dist\compile\validate\index.js:192:13
at CodeGen.code (D:\Projects\UBX\angular\node_modules@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:439:13)
at CodeGen.block (D:\Projects\UBX\angular\node_modules@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:568:18)

8 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Could you provide the steps to reproduce? thanks

  • User Avatar
    0
    vipulbuoyancy created

    hello,

    I shared my steps of Code generator in abp suite

    step 1:

    • add new entity detail

    step 2:

    • add properties

    step 3:

    • add one-to-many navigation property

    step 4:

    • click save and generate button.
  • User Avatar
    0
    muhammedaltug created

    Hello,

    We had this error before version 5.1.2.
    Is ABP Suite version 5.2.2? Also, is the @abp/ng.schematics package version 5.2.2?

  • User Avatar
    0
    vipulbuoyancy created

    Hello,

    • abp version

    • abp suite version

    • angular version

  • User Avatar
    0
    muhammedaltug created

    Hello,

    Can you try to generate after removing angular/.suite folder?

  • User Avatar
    0
    vipulbuoyancy created

    hello,

    I try to generate after removing angular/.suite folder. Generate angular component successfully. But not display menu for new entity in angular UI. I faced get error in existing entity in angular UI :

    core.mjs:6494 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(OnAppUserModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper! NullInjectorError: R3InjectorError(OnAppUserModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper! at NullInjector.get (core.mjs:11157:1) at R3Injector.get (core.mjs:11324:1) at R3Injector.get (core.mjs:11324:1) at R3Injector.get (core.mjs:11324:1) at NgModuleRef.get (core.mjs:21888:1) at R3Injector.get (core.mjs:11324:1) at NgModuleRef.get (core.mjs:21888:1) at Object.get (core.mjs:21565:1) at lookupTokenUsingModuleInjector (core.mjs:3367:1) at getOrCreateInjectable (core.mjs:3479:1) at resolvePromise (zone.js:1213:1) at resolvePromise (zone.js:1167:1) at zone.js:1279:1 at ZoneDelegate.invokeTask (zone.js:406:1) at Object.onInvokeTask (core.mjs:25595:1) at ZoneDelegate.invokeTask (zone.js:405:1) at Zone.runTask (zone.js:178:1) at drainMicroTaskQueue (zone.js:582:1)

    Thanks

  • User Avatar
    0
    vipulbuoyancy created

    Hello,

    I add new entity from Code Generator abp suite. successfully generated my code. but I click new entity menu in angular UI. faced error in console. core.mjs:6494 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(UserKeyModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper! NullInjectorError: R3InjectorError(UserKeyModule)[ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper -> ScrollbarHelper]: NullInjectorError: No provider for ScrollbarHelper! at NullInjector.get (core.mjs:11157:1) at R3Injector.get (core.mjs:11324:1) at R3Injector.get (core.mjs:11324:1) at R3Injector.get (core.mjs:11324:1) at NgModuleRef.get (core.mjs:21888:1) at R3Injector.get (core.mjs:11324:1) at NgModuleRef.get (core.mjs:21888:1) at Object.get (core.mjs:21565:1) at lookupTokenUsingModuleInjector (core.mjs:3367:1) at getOrCreateInjectable (core.mjs:3479:1) at resolvePromise (zone.js:1213:1) at resolvePromise (zone.js:1167:1) at zone.js:1279:1 at ZoneDelegate.invokeTask (zone.js:406:1) at Object.onInvokeTask (core.mjs:25595:1) at ZoneDelegate.invokeTask (zone.js:405:1) at Zone.runTask (zone.js:178:1) at drainMicroTaskQueue (zone.js:582:1)

    please solve this error

    Thanks

  • User Avatar
    0
    muhammedaltug created

    Hello,

    Sorry for the latency in answering your question.

    I created a new app in version 5.2.2 and I followed the steps. There is no error in the console.

    Can you restart the angular app after removing the .angular folder (angular cache folder) in the angular folder?

    Can you remove generated code and try to regenerate the same entity?

    If the error still exists can you send me an example project which includes this error?

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11