Open Closed

[Invalid Module] Backend module "productService" does not exist in API definition. #3893


User avatar
1
Baytech created
  • ABP Framework version: 6
  • UI type: Angular
  • DB provider: EF Core
  • **Microservice
  • Exception message and stack trace: [Invalid Module] Backend module "productService" does not exist in API definition.
  • Steps to reproduce the issue:"
  • abp generate-proxy -t ng

I tried this solution here, but it does not work. https://support.abp.io/QA/Questions/2824/An-error-occurred-while-generating-the-client-proxy-for-microserviceangular

Also, tried this one - https://gist.github.com/muhammedaltug/8969dd3ea00e902b034c8a5743165248, but it did not work either.

Is there any guidance on generating proxies w/ the default microservice solution?

Side question, is anyone using microservices?


6 Answer(s)
  • User Avatar
    0
    antoine.baril created

    Hi, I have the exact same issue. I also tried the two suggested solutions, without success. Even if I change the information of the "default" key in the environment.ts file, the apiName in the generated proxies will still be "default".

    The only way I found so far to make this work (which is an ugly workaround) is to edit each generated file and change the "apiName" key's value by the correct apiName.

    For instance, here is how it looks in the environment.ts file :

    When I generate the proxies, the apiName is not generated correctly (see image below) :

    So I just edit it manually :

    However, this is an ugly workaround because each time I generate the proxies, the apiName value is overwritten. It's just a fix to be able to keep working, at least.

    Any help would be greatly appreciated!

    Thank you

  • User Avatar
    0
    Baytech created

    At least you can generate the proxy. I cannot get it to generate at all. Still getting - " [Invalid Module] Backend module "productService" does not exist in API definition."

  • User Avatar
    0
    antoine.baril created

    I also get this issue when I try to specify a modul. I have to use the following syntax and specify the URL instead of the module name (where the URL is the one my micro-service) :

    abp generate-proxy -t ng --url https://localhost:56691

  • User Avatar
    0
    Baytech created

    I also get this issue when I try to specify a modul. I have to use the following syntax and specify the URL instead of the module name (where the URL is the one my micro-service) :

    abp generate-proxy -t ng --url https://localhost:56691

    I still get this error. I am wondering I created the microservice project with the name with a dot. "Baytech.Systems" maybe that is causing issues. (EDIT) Just tried the creating another project with Baytech as the name of the project without the .Systems, still same issue.

  • User Avatar
    0
    muhammedaltug created

    Hello

    Can you send the response of the https://localhost:44987/api/abp/api-definition endpoint request?

  • User Avatar
    0
    Baytech created

    I ended up getting this to work.

    https://gist.github.com/muhammedaltug/8969dd3ea00e902b034c8a5743165248

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