Open Closed

Error on regenerate Angular UI from Suite #7316


User avatar
0
andmattia created
  • ABP Framework version: v7.4.5

I've a solution in 7.4.5 with angular UI. If I try to add a properties from suite it works for backend but not for angular

2024-06-07 12:15:51.771 +02:00 [INF] 1/2 - GenerateProxyCommand started...
2024-06-07 12:15:51.776 +02:00 [INF] 1/2 - GenerateProxyCommand completed.                            | Duration: 1 ms.
2024-06-07 12:15:51.777 +02:00 [INF] 2/2 - AngularUiGenerateWithSchematicsCommand started...
2024-06-07 12:16:26.147 +02:00 [INF] Running the Angular Schematics command:
node run-schematics.mjs "C:/Repos/my-module/angular/.suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" module-pro Dm.MyModule "C:/Repos/my-module/.suite/entities/Product.json" "C:/Repos/my-module/angular"
2024-06-07 12:16:29.365 +02:00 [INF] Angular Schematics command failed.
C:\Repos\my-module\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 Dm.MyModule --source C:/Repos/my-module/.suite/entities/Product.json

Could not find an NgModule. Use the '--skip-import' option to skip importing in NgModule.
    at makeError (C:\Repos\my-module\angular\.suite\schematics\node_modules\execa\lib\error.js:60:11)
    at handlePromise (C:\Repos\my-module\angular\.suite\schematics\node_modules\execa\index.js:118:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///C:/Repos/my-module/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 Dm.MyModule --source C:/Repos/my-module/.suite/entities/Product.json',
  command: '.suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template module-pro --target Dm.MyModule --source C:/Repos/my-module/.suite/entities/Product.json',
  escapedCommand: '".suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" --template module-pro --target Dm.MyModule --source "C:/Repos/my-module/.suite/entities/Product.json"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: "Could not find an NgModule. Use the '--skip-import' option to skip importing in NgModule.",
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Node.js v18.12.0

 

2024-06-07 12:16:29.523 +02:00 [INF] 2/2 - AngularUiGenerateWithSchematicsCommand completed.          | Duration: 37746 ms.
2024-06-07 12:16:29.524 +02:00 [INF] Entity generation completed in 38 sec.
2024-06-07 12:16:29.535 +02:00 [INF] Executing StatusCodeResult, setting HTTP status code 204
2024-06-07 12:16:29.536 +02:00 [INF] Executed action Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite) in 38903.462ms
2024-06-07 12:16:29.536 +02:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite)'
2024-06-07 12:16:29.536 +02:00 [INF] Request finished HTTP/1.1 POST http://localhost:3000/api/abpSuite/crudPageGenerator/13c78b2d-bf62-4562-8522-0cb7020aae48/save-and-generate-entity application/json 2761 - 204 - - 38910.8480ms
2024-06-07 12:16:29.582 +02:00 [INF] Request starting HTTP/1.1 GET http://localhost:3000/api/abpSuite/crudPageGenerator/13c78b2d-bf62-4562-8522-0cb7020aae48/entities application/json -
2024-06-07 12:16:29.584 +02:00 [INF] Executing endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetEntitiesAsync (Volo.Abp.Suite)'
2024-06-07 12:16:29.584 +02:00 [INF] Route matched with {controller = "crudPageGenerator", action = "GetEntities", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[System.Collections.Generic.List`1[Volo.Abp.Suite.Models.EntityModel]] GetEntitiesAsync(System.Guid) on controller Volo.Abp.Suite.Controllers.CrudPageGeneratorController (Volo.Abp.Suite).
2024-06-07 12:16:29.614 +02:00 [INF] Executing ObjectResult, writing value of type 'System.Collections.Generic.List`1[[Volo.Abp.Suite.Models.EntityModel, Volo.Abp.Suite, Version=7.4.5.0, Culture=neutral, PublicKeyToken=null]]'.
2024-06-07 12:16:29.616 +02:00 [INF] Executed action Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetEntitiesAsync (Volo.Abp.Suite) in 31.7284ms
2024-06-07 12:16:29.617 +02:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetEntitiesAsync (Volo.Abp.Suite)'
2024-06-07 12:16:29.617 +02:00 [INF] Request finished HTTP/1.1 GET http://localhost:3000/api/abpSuite/crudPageGenerator/13c78b2d-bf62-4562-8522-0cb7020aae48/entities application/json - - 200 - application/json;+charset=utf-8 34.8559ms

I try to use --skip-import but it doesn't work.


9 Answer(s)
  • User Avatar
    0
    andmattia created

    Any news?

  • User Avatar
    0
    guven.uysall created

    Hi, Open the ./suite/schematic folder in the terminal in the ui project. Delete the node_module here and run npm install --legacy-peer-deps.

    Alternatively, the Angular version on your computer and the Angular version of the project may be different.

  • User Avatar
    0
    laura created

    Hi, Open the ./suite/schematic folder in the terminal in the ui project. Delete the node_module here and run npm install --legacy-peer-deps.

    Alternatively, the Angular version on your computer and the Angular version of the project may be different.

    Hi,

    The Angular version on the computer is the same as in the project, 16.2.0. I deleted the node_modules folder as you suggested and ran npm install --legacy-peer-deps, but I still have the same error, and the UI is not generated from the suite.

  • User Avatar
    0
    guven.uysall created

    Can you check your generate-proxy.json file? Is there an error here?

  • User Avatar
    0
    laura created

    Can you check your generate-proxy.json file? Is there an error here?

    No errors, the file isn't modify by the suite

  • User Avatar
    0
    andmattia created

    If you see the log. Suite is not able to find ng comand on C:\Repos\my-module\angular.suite\schematics\node_modules

  • User Avatar
    0
    masum.ulu created
    Support Team Angular Expert

    Hi andmattia, Can you please give more info about your solution.

    • What is template type (app | module | microservice) ?
    • Which properties you created on suite ?
    • What is ABP CLI and ABP Suite versions exactly ?
  • User Avatar
    0
    andmattia created

    Hi

    sorry for delay.

    • template microservice
    • any kind of props
    • abp 7.4.5 for suite & cli and also with cli 8.0.2
  • User Avatar
    0
    masum.ulu created
    Support Team Angular Expert

    Can you make ABP (CLI and Suite) version exactly same and try to re-produce error. Because I couldn't produce error. Also what is your project's angular package versions can you please share ?

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11