0
ash.jackson created
- ABP Framework version: v7.0.0
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Steps to reproduce the issue:
- Create new micro service pro service template
- Open with suite
- Define & Generate an entity
- Observe Angular compilation error
Error: projects/my-service/src/lib/examples/example/components/example.component.ts:8:47 - error TS2307: Cannot find module '../../../proxy/example/models' or its corresponding type declarations.
The two reference paths added to the ExampleComponent are in error:
import type { GetExamplesInput, ExampleDto } from '../../../proxy/example/models';
import { ExampleService } from '../../../proxy/examples/example.service';
If I ask Rider to resolve the references they are replaced with the following:
import { ExampleDto, GetExamplesInput } from '../../../proxy/example-service/examples';
import { ExampleService } from '../../../proxy/example-service/controllers/examples';
The Angular app now compiles and runs.
4 Answer(s)
-
0
Hello,
Can you send environment.ts file?
-
0
environment.ts:
import { Environment } from '@abp/ng.core'; const baseUrl = 'http://localhost:4200'; const oAuthConfig = { issuer: 'https://localhost:44322/', redirectUri: baseUrl, clientId: 'Angular', responseType: 'code', scope: 'offline_access openid profile email phone AccountService IdentityService AdministrationService SaasService ProductService MyService', requireHttps: true, }; export const environment = { production: false, application: { baseUrl, name: 'CloudBiz', }, oAuthConfig, apis: { default: { url: 'https://localhost:44325', rootNamespace: 'CloudBiz', }, AbpAccountPublic: { url: oAuthConfig.issuer, rootNamespace: 'AbpAccountPublic', }, ProductService: { url: 'https://localhost:44325', rootNamespace: 'CloudBiz', }, MyService: { url: 'https://localhost:44325', rootNamespace: 'CloudBiz', }, }, } as Environment;
-
0
Hello,
Can you update the MyService configuration like following
{ MyService: { url: 'https://localhost:44325', rootNamespace: 'CloudBiz.MyService', }, }
-
0
This has solved the issue - I should also add that Suite did not add MyService to environment.ts at all, I did that part manually as part of adding the module to my microservice solution.