The issue is back. Please refer the issue and you will understand what I am asking.
This probably happened with the latest update of Abp Studio.
In Brief I have 2 mciroservice and when i try to generate proxy for one microservice it errors out stating the other microservice
angular>abp generate-proxy -t ng -url http://localhost:44319 -m artificialintelligence
[19:50:38 INF] You are running the second generation of the ABP CLI. If you're interested in the legacy CLI, see https://abp.io/new-cli
[19:50:39 WRN] "@abp/ng.schematics" version is lower than ABP Cli version.
[Invalid Module] Backend module "document" does not exist in API definition.
1 Answer(s)
-
0
The error
[Invalid Module] Backend module "document" does not exist in API definition.
indicates that the ABP CLI is trying to generate proxies for a module ("document") that is not present in the API definition exposed by your backend at the specified URL.This issue can occur if:
- The backend microservice you are targeting (with
-url http://localhost:44319
and-m artificialintelligence
) does not expose the "document" module in its API definition. - The API definition endpoint (
/api/abp/api-definition?includeTypes=true
) is returning information about both microservices, but one of them is not running or not properly configured. - There is a mismatch between the running backend services and the modules you are specifying in the CLI command.
- The backend microservice you are targeting (with
Solution Steps
Ensure Both Microservices Are Running
- Start both microservices so that their API definitions are available. The ABP CLI may attempt to resolve all modules referenced in the solution.
Check API Definition
- Open
http://localhost:44319/api/abp/api-definition?includeTypes=true
in your browser or use a tool like Postman to verify which modules are exposed. Ensure "artificialintelligence" is present and "document" is not erroneously referenced.
- Open
Check CLI and Schematics Versions
- The warning
@abp/ng.schematics" version is lower than ABP Cli version
suggests a version mismatch. Update both the ABP CLI and@abp/ng.schematics
to the latest compatible versions:dotnet tool update -g Volo.Abp.Cli npm install @abp/ng.schematics@latest --save-dev
- The warning
Specify the Correct Module
- Double-check the module name you pass with
-m
. It must match exactly as exposed in the API definition.
- Double-check the module name you pass with
Clean and Rebuild
- Sometimes, cleaning and rebuilding both backend and frontend projects can resolve stale references.
If Using ABP Studio
- Ensure ABP Studio is updated to the latest version, as recent updates may affect proxy generation.
References
- ABP CLI generate-proxy documentation
- ABP Angular Service Proxies
- [Support Issue #9058](https://abp.io/support/questions/9058)
- [Support Issue #9153](https://abp.io/support/questions/9153)
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.