Open Closed

Suite error when generating angular UI for module. #5266


User avatar
0
ash.jackson created
  1. ABP Framework version: v7.2.2
  2. UI type: Angular
  3. DB provider: EF Core / MySQL
  4. Tiered (MVC) or Identity Server Separated (Angular): yes
  5. Steps to reproduce the issue:"
    1. Create app pro project with Lepton theme.
    2. Add Lepton and Account source to project.
    3. Use suite to add module to app.
    4. Open module in suite.
    5. Create and generate crud page/entity.
    6. Observe that angular ui is not generated.

Hi There,

When I generate a entity in suite, the angular UI is failing to generate. This is in a freshly generated project, the only difference from defaults is that the theme is Lepton, not LeptonX and I have added the theme source code to the project. The entity is being created inside a module. The module was added using the suite UI.

Kind Regards, AJ.

Here is the log file for the generation:

=== ENTITY GENERATION STARTED === 
* SOLUTION: EwsApi
* ENTITY:{
  "Id": "89bcf579-2a93-4b51-9db8-85ab5ee850fd",
  "Name": "Connection",
  "OriginalName": "Connection",
  "NamePlural": "Connections",
  "DatabaseTableName": "Connections",
  "Namespace": "Connections",
  "BaseClass": "FullAuditedAggregateRoot",
  "MenuIcon": "server",
  "PrimaryKeyType": "Guid",
  "IsMultiTenant": true,
  "CheckConcurrency": true,
  "ShouldCreateUserInterface": true,
  "ShouldCreateBackend": true,
  "ShouldExportExcel": true,
  "ShouldAddMigration": true,
  "ShouldUpdateDatabase": true,
  "CreateTests": true,
  "Properties": [
    {
      "Id": "c3d53e16-0872-40ae-9b0b-e55880927263",
      "Name": "Name",
      "Type": "string",
      "EnumType": "",
      "EnumNamespace": "",
      "EnumAngularImport": "shared/enums",
      "EnumFilePath": null,
      "DefaultValue": null,
      "IsNullable": false,
      "IsRequired": true,
      "IsTextArea": false,
      "MinLength": null,
      "MaxLength": 250,
      "SortOrder": 0,
      "SortType": 0,
      "Regex": "",
      "EmailValidation": false,
      "ShowOnList": true,
      "ShowOnCreateModal": true,
      "ShowOnEditModal": true,
      "ReadonlyOnEditModal": false,
      "EnumValues": null,
      "IsSelected": true,
      "OrdinalIndex": 0
    },
    {
      "Id": "8645b3e6-5ac8-45e8-968b-79ed5032ee12",
      "Name": "Url",
      "Type": "string",
      "EnumType": "",
      "EnumNamespace": "",
      "EnumAngularImport": "shared/enums",
      "EnumFilePath": null,
      "DefaultValue": null,
      "IsNullable": false,
      "IsRequired": true,
      "IsTextArea": false,
      "MinLength": null,
      "MaxLength": 1000,
      "SortOrder": 0,
      "SortType": 0,
      "Regex": "",
      "EmailValidation": false,
      "ShowOnList": true,
      "ShowOnCreateModal": true,
      "ShowOnEditModal": true,
      "ReadonlyOnEditModal": false,
      "EnumValues": null,
      "IsSelected": true,
      "OrdinalIndex": 0
    },
    {
      "Id": "c45ff12e-c5bb-4f00-9d59-97ddb2c14337",
      "Name": "UserName",
      "Type": "string",
      "EnumType": "",
      "EnumNamespace": "",
      "EnumAngularImport": "shared/enums",
      "EnumFilePath": null,
      "DefaultValue": null,
      "IsNullable": false,
      "IsRequired": true,
      "IsTextArea": false,
      "MinLength": null,
      "MaxLength": 250,
      "SortOrder": 0,
      "SortType": 0,
      "Regex": "",
      "EmailValidation": false,
      "ShowOnList": true,
      "ShowOnCreateModal": true,
      "ShowOnEditModal": true,
      "ReadonlyOnEditModal": false,
      "EnumValues": null,
      "IsSelected": true,
      "OrdinalIndex": 0
    },
    {
      "Id": "cc5ba564-475e-4be4-9715-fb24ac843343",
      "Name": "Password",
      "Type": "string",
      "EnumType": "",
      "EnumNamespace": "",
      "EnumAngularImport": "shared/enums",
      "EnumFilePath": null,
      "DefaultValue": null,
      "IsNullable": false,
      "IsRequired": true,
      "IsTextArea": false,
      "MinLength": null,
      "MaxLength": 250,
      "SortOrder": 0,
      "SortType": 0,
      "Regex": "",
      "EmailValidation": false,
      "ShowOnList": true,
      "ShowOnCreateModal": true,
      "ShowOnEditModal": true,
      "ReadonlyOnEditModal": false,
      "EnumValues": null,
      "IsSelected": true,
      "OrdinalIndex": 0
    },
    {
      "Id": "414929e5-0ad0-404d-b674-26da85d5575d",
      "Name": "WmsId",
      "Type": "string",
      "EnumType": "",
      "EnumNamespace": "",
      "EnumAngularImport": "shared/enums",
      "EnumFilePath": null,
      "DefaultValue": null,
      "IsNullable": false,
      "IsRequired": true,
      "IsTextArea": false,
      "MinLength": null,
      "MaxLength": 250,
      "SortOrder": 0,
      "SortType": 0,
      "Regex": "",
      "EmailValidation": false,
      "ShowOnList": true,
      "ShowOnCreateModal": true,
      "ShowOnEditModal": true,
      "ReadonlyOnEditModal": false,
      "EnumValues": null,
      "IsSelected": true,
      "OrdinalIndex": 0
    },
    {
      "Id": "8a83fc5f-c84a-4da5-a3fc-670c38886044",
      "Name": "Enabled",
      "Type": "bool",
      "EnumType": "",
      "EnumNamespace": "",
      "EnumAngularImport": "shared/enums",
      "EnumFilePath": null,
      "DefaultValue": "true",
      "IsNullable": false,
      "IsRequired": false,
      "IsTextArea": false,
      "MinLength": null,
      "MaxLength": null,
      "SortOrder": 0,
      "SortType": 0,
      "Regex": "",
      "EmailValidation": false,
      "ShowOnList": true,
      "ShowOnCreateModal": true,
      "ShowOnEditModal": true,
      "ReadonlyOnEditModal": false,
      "EnumValues": null,
      "IsSelected": true,
      "OrdinalIndex": 0
    }
  ],
  "NavigationProperties": [],
  "NavigationConnections": [],
  "PhysicalFileName": "Connection.json"
}

2023-06-19 11:41:59.780 +01:00 [INF] 1/10 - EntityGenerateCommand started...
2023-06-19 11:42:01.520 +01:00 [INF] 1/10 - EntityGenerateCommand completed.                           | Duration: 1738 ms.
2023-06-19 11:42:01.520 +01:00 [INF] 2/10 - RepositoryCommand started...
2023-06-19 11:42:01.625 +01:00 [INF] 2/10 - RepositoryCommand completed.                               | Duration: 104 ms.
2023-06-19 11:42:01.625 +01:00 [INF] 3/10 - ManagerCommand started...
2023-06-19 11:42:01.656 +01:00 [INF] 3/10 - ManagerCommand completed.                                  | Duration: 31 ms.
2023-06-19 11:42:01.656 +01:00 [INF] 4/10 - AppServiceCommand started...
2023-06-19 11:42:06.211 +01:00 [INF] 4/10 - AppServiceCommand completed.                               | Duration: 4554 ms.
2023-06-19 11:42:06.211 +01:00 [INF] 5/10 - ProxyControllerCommand started...
2023-06-19 11:42:06.289 +01:00 [INF] 5/10 - ProxyControllerCommand completed.                          | Duration: 78 ms.
2023-06-19 11:42:06.290 +01:00 [INF] 6/10 - PermissionCommand started...
2023-06-19 11:42:06.385 +01:00 [INF] 6/10 - PermissionCommand completed.                               | Duration: 95 ms.
2023-06-19 11:42:06.385 +01:00 [INF] 7/10 - ApplicationObjectMappingCommand started...
2023-06-19 11:42:06.400 +01:00 [INF] 7/10 - ApplicationObjectMappingCommand completed.                 | Duration: 15 ms.
2023-06-19 11:42:06.400 +01:00 [INF] 8/10 - UnitTestCommandCommand started...
2023-06-19 11:42:06.513 +01:00 [INF] 8/10 - UnitTestCommandCommand completed.                          | Duration: 112 ms.
2023-06-19 11:42:06.513 +01:00 [INF] 9/10 - GenerateProxyCommand started...
2023-06-19 11:42:06.516 +01:00 [INF] 9/10 - GenerateProxyCommand completed.                            | Duration: 2 ms.
2023-06-19 11:42:06.516 +01:00 [INF] 10/10 - AngularUiGenerateWithSchematicsCommand started...
2023-06-19 11:42:06.525 +01:00 [INF] Running the Angular Schematics command:
node run-schematics.mjs '/Users/ashjackson/Git/EWSUKOps/EWUKOperations/angular/.suite/schematics/node_modules/.bin/ng' g '.suite/schematics/collection.json:entity' module-pro EwsApi '/Users/ashjackson/Git/EWSUKOps/EWUKOperations/aspnet-core/modules/EwsApi/.suite/entities/Connection.json' '/Users/ashjackson/Git/EWSUKOps/EWUKOperations/angular' 
2023-06-19 11:42:06.662 +01:00 [INF] Angular Schematics command failed.
file:///Users/ashjackson/Git/EWSUKOps/EWUKOperations/angular/.suite/schematics/run-schematics.mjs:1
import { execa } from "execa";
         ^^^^^
SyntaxError: Named export 'execa' not found. The requested module 'execa' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'execa';
const { execa } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
    at async loadESM (node:internal/process/esm_loader:88:5)
    at async handleMainPromise (node:internal/modules/run_main:61:12)

2023-06-19 11:42:06.671 +01:00 [INF] 10/10 - AngularUiGenerateWithSchematicsCommand completed.          | Duration: 154 ms.
2023-06-19 11:42:06.671 +01:00 [INF] Entity generation completed in 7 sec.


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

    Hi,

    We will check it.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can't reproduce the problem.

    Could you share the full steps to reproduce? thanks.

  • User Avatar
    0
    ash.jackson created

    Hi There, I have re-generated the solution, and the problem is solved. It is not clear how this is any different that before, so for now I will close the ticket as it looks like it may have been a one-off error when abp-new was running the first time.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09