Open Closed

Issue Creating Proxies #8665


User avatar
0
maharatha@gmail.com created
  • ABP Framework version: v9.0.2

  • UI Type: Angular

  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

I created 2 Microservice and using the AbpStudio I tried creating proxy for the first microservice and it ran perfectly fine. However when I tried to run the proxy for the second microservice it gives me the below error :;

[Invalid Module] Backend module "myfirstmodulename" does not exist in API definition.

The problem is why its referring to the previous microservice name when I am generating the proxy for the second microservice


4 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello

    Is the myfirstmodulename up and running when you run abp generate-proxy -t ng? Also, can you share your environment.ts file?

    Thank you.

  • User Avatar
    0
    maharatha@gmail.com created

    Yes and No. I tried both but the same error.

    Below is the environment.ts file :

    import { Environment } from '@abp/ng.core';
    
    const baseUrl = 'http://localhost:4200';
    
    const oAuthConfig = {
      issuer: 'http://localhost:44344/',
      redirectUri: baseUrl,
      clientId: 'Angular',
      responseType: 'code',
      scope: 'offline_access openid profile email phone AuthServer IdentityService AdministrationService AuditLoggingService GdprService ChatService SaasService FileManagementService LanguageService FirstService SecondService',
      requireHttps: false,
      impersonation: {
        tenantImpersonation: true,
        userImpersonation: true,
      }
    };
    
    export const environment = {
      production: false,
      application: {
        baseUrl,
        name: 'xxxx',
      }, 
      localization: {
        defaultResourceName: 'xxxx'
      },
      oAuthConfig,
      apis: {
        default: {
          url: 'http://localhost:44308',
          rootNamespace: 'xxxx',
        },
        AbpAccountPublic: {
          url: oAuthConfig.issuer,
          rootNamespace: 'AbpAccountPublic',
        },
      },
    } as Environment;
    
    
  • User Avatar
    0
    maharatha@gmail.com created

    Running abp generate-proxy -t ng gives the same error :

    [Invalid Module] Backend module "firstmodule" does not exist in API definition.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello

    Can you please check this link https://abp.io/support/questions/2824/An-error-occurred-while-generating-the-client-proxy-for-microserviceangular#answer-b3f9c4c1-c15d-b898-1351-3a030eca3ab2 it will helps you.

    Thank you.

Made with ❤️ on ABP v9.2.0-preview. Updated on January 16, 2025, 11:47