Open Closed

Issue Generating Angular Code in 9.1 #8956


User avatar
0
maharatha@gmail.com created

I started a new micro service solution with a new installation of everything and using 9.1

I am encountering the below issue while generating the UI for angular using Abp Suite :

025-03-11 22:03:34.292 -07:00 [INF] Running the Angular Schematics command:
node run-schematics.mjs "C:/SourceCode/xxxServices/apps/angular/.suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" app-nolayers-pro xxxServices.AIService "C:/SourceCode/xxxServices/services/ai/.suite/entities/TestPage.json" "C:/SourceCode/xxxServices/apps/angular" 
2025-03-11 22:03:36.033 -07:00 [INF] Angular Schematics command failed.
C:\SourceCode\xxxServices\apps\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 app-nolayers-pro --target xxxServices.AIService --source C:/SourceCode/xxxServices/services/ai/.suite/entities/TestPage.json
[Project Not Found] A project matching entity solution name or a default project does not exist in your Angular workspace.
    at makeError (C:\SourceCode\xxxServices\apps\angular\.suite\schematics\node_modules\execa\lib\error.js:60:11)
    at handlePromise (C:\SourceCode\xxxServices\apps\angular\.suite\schematics\node_modules\execa\index.js:118:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async file:///C:/SourceCode/xxxServices/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 app-nolayers-pro --target xxxServices.AIService --source C:/SourceCode/xxxServices/services/ai/.suite/entities/TestPage.json',
  command: '.suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template app-nolayers-pro --target xxxServices.AIService --source C:/SourceCode/xxxServices/services/ai/.suite/entities/TestPage.json',
  escapedCommand: '".suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" --template app-nolayers-pro --target xxxServices.AIService --source "C:/SourceCode/xxxServices/services/ai/.suite/entities/TestPage.json"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: '\x1B[1m\x1B[31m[Project Not Found] A project matching entity solution name or a default project does not exist in your Angular workspace.\x1B[39m\x1B[22m',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Node.js v22.14.0

8 Answer(s)
  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello, thank you for reporting this. It will be fixed within the next patch release.

    Until then, I can suggest you to generate a library for your microservice before creating an entity. You need to use the same name with the microservice by using this command yarn ng generate @abp/ng.schematics:create-lib under your angular app directory.

    Please let me know if you need further assistance on this.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Just to clarify, if you're using the studio to add the services, it should automatically add the library at this stage. After that, you should be able to create entities through the suite as expected. Also, could you confirm if you're using the latest version of the studio?

  • User Avatar
    0
    maharatha@gmail.com created

    I am not sure what solution you are providing here, I use Studio to create the Microservices which ultimately created a separate folder in the Angular project folder. Then I go ahead and start using the Abp Suite to create a CRUD page and when I do that I get the below error : This error is from the log file of the Abp Suite.

    025-03-11 22:03:34.292 -07:00 [INF] Running the Angular Schematics command:
    node run-schematics.mjs "C:/SourceCode/xxxServices/apps/angular/.suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" app-nolayers-pro xxxServices.AIService "C:/SourceCode/xxxServices/services/ai/.suite/entities/TestPage.json" "C:/SourceCode/xxxServices/apps/angular" 
    2025-03-11 22:03:36.033 -07:00 [INF] Angular Schematics command failed.
    C:\SourceCode\xxxServices\apps\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 app-nolayers-pro --target xxxServices.AIService --source C:/SourceCode/xxxServices/services/ai/.suite/entities/TestPage.json
    [Project Not Found] A project matching entity solution name or a default project does not exist in your Angular workspace.
        at makeError (C:\SourceCode\xxxServices\apps\angular\.suite\schematics\node_modules\execa\lib\error.js:60:11)
        at handlePromise (C:\SourceCode\xxxServices\apps\angular\.suite\schematics\node_modules\execa\index.js:118:26)
        at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
        at async file:///C:/SourceCode/xxxServices/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 app-nolayers-pro --target xxxServices.AIService --source C:/SourceCode/xxxServices/services/ai/.suite/entities/TestPage.json',
      command: '.suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template app-nolayers-pro --target xxxServices.AIService --source C:/SourceCode/xxxServices/services/ai/.suite/entities/TestPage.json',
      escapedCommand: '".suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" --template app-nolayers-pro --target xxxServices.AIService --source "C:/SourceCode/xxxServices/services/ai/.suite/entities/TestPage.json"',
      exitCode: 1,
      signal: undefined,
      signalDescription: undefined,
      stdout: '',
      stderr: '\x1B[1m\x1B[31m[Project Not Found] A project matching entity solution name or a default project does not exist in your Angular workspace.\x1B[39m\x1B[22m',
      failed: true,
      timedOut: false,
      isCanceled: false,
      killed: false
    }
    
    Node.js v22.14.0
    
        
    

    Can you create a new microservice solution using Abp Studio and then add a new micro service to it and after that go to Abp Suite and add a new page. Are you able to do that , if so then share the steps how yopu are able to do it.

    My problem is I am unable to create a CRUD page / Entities, all code for C# generates perfectly however no CRUD page gets created in Angular?

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Yes, I can share the steps to create a microservice and add a CRUD page in Abp Studio and Suite.

    1. Create a new microservice solution using Abp Studio.

    2. Add a new microservice to the solution.
      first-add-ms-one.png
      After adding the service the solution folder structure will look like this:
      three-add-ms-lib-one.png

    3. Open Abp Suite, select the microservice, and add a new entity.
      start-suite.png
      After code generation you will see the created pages
      suite-generation.png

    If the generation isn't successful in Angular but works in C#, ensure:

    1. You're using the latest Abp Studio (currently 0.9.25).

    2. The Angular project is properly linked and configured.

    Please try these steps and let us know if you need further assistance!

  • User Avatar
    0
    maharatha@gmail.com created

    I am exactly trying what you mentioned above and this is what's getting generated

    <br>
    <br>
    Screenshot 2025-03-13 230622.png

    I have sent you the error message from the Abp Suite Log as well.

    Neither proxies nor components are getting created.

    Can we get into call to resolve this ?

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Thank you for sharing a screenshot of how your library is generated.
    I caught that the service name you use is AIService. This generates a library like a-i-service. When I tried with AiService instead, it will work fine. Can I kindly ask for you to try in this way as well?

  • User Avatar
    0
    maharatha@gmail.com created

    Thank You @sumeye. You pointed the issue correctly, and this is something you guys have to resolve or let customers know that they can's have a Microservice Name with 2 caps letter in it or at least suggest some naming convention

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Glad to hear your issue is resolved! We will be updating our documentation to clarify the naming convention.
    If you need any further assistance, do not hesitate to reach out.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 10, 2025, 12:38