Base solution for your next web application
Open Closed

Angular project errors out on npm start after adding entities through power tools. #7104


User avatar
0
hardeep368 created

env: vs2019, asp net core and angular 6.91, sql 2017

generated 2 entities using power tools. Files were generated and added to solution. asp net core solution worked ok and apis were generated along with db migration. angular project files were also generated but when i did npm start on the command prompt it errored out with the error below. Are there any manual steps that I missed here??

c:\CDemo\CDemo\angular>npm start

[email protected] start c:\Cloud9UniversalDemo\Cloud9UniversalDemo\angular ng serve --host 0.0.0.0 --port 4200

WARNING: This is a simple server for use in testing or debugging Angular applications locally. It hasn't been reviewed for security issues.

Binding this server to an open connection can result in compromising your application or computer. Using a different host than the one passed to the "--host" flag might result in websocket connection issues. You might need to use "--disableHostCheck" if that's the case. ** Angular Live Development Server is listening on 0.0.0.0:4200, open your browser on http://localhost:4200/ **

Date: 2019-06-01T21:07:12.381Z Hash: e923b79fe888327e6239 Time: 184806ms chunk {main} main.js, main.js.map (main) 1.89 kB [initial] [rendered] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 93.1 kB [initial] [rendered] chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered] chunk {scripts} scripts.js, scripts.js.map (scripts) 2.21 MB [entry] [rendered] chunk {styles} styles.js, styles.js.map (styles) 1.42 MB [initial] [rendered] chunk {vendor} vendor.js, vendor.js.map (vendor) 327 kB [initial] [rendered]

ERROR in src/app/main/employees/employees/create-or-edit-employee-modal.component.ts(4,10): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'EmployeesServiceProxy'. src/app/main/employees/employees/create-or-edit-employee-modal.component.ts(4,33): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'CreateOrEditEmployeeDto'. src/app/main/employees/employees/employees.component.ts(4,10): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'EmployeesServiceProxy'. src/app/main/employees/employees/employees.component.ts(4,33): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'EmployeeDto'. src/app/main/employees/employees/view-employee-modal.component.ts(3,10): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'GetEmployeeForViewDto'. src/app/main/employees/employees/view-employee-modal.component.ts(3,33): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'EmployeeDto'. src/app/main/equipments/equipments/create-or-edit-equipment-modal.component.ts(4,10): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'EquipmentsServiceProxy'. src/app/main/equipments/equipments/create-or-edit-equipment-modal.component.ts(4,34): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'CreateOrEditEquipmentDto'. src/app/main/equipments/equipments/equipments.component.ts(4,10): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'EquipmentsServiceProxy'. src/app/main/equipments/equipments/equipments.component.ts(4,34): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'EquipmentDto'. src/app/main/equipments/equipments/view-equipment-modal.component.ts(3,10): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'GetEquipmentForViewDto'. src/app/main/equipments/equipments/view-equipment-modal.component.ts(3,34): error TS2305: Module '"c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies"' has no exported member 'EquipmentDto'. src/shared/service-proxies/service-proxy.module.ts(8,27): error TS2339: Property 'EmployeesServiceProxy' does not exist on type 'typeof import("c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies")'. src/shared/service-proxies/service-proxy.module.ts(9,27): error TS2339: Property 'EquipmentsServiceProxy' does not exist on type 'typeof import("c:/Cdemo/Cdemo/angular/src/shared/service-proxies/service-proxies")'.


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Try to regenerate service-proxies. https://docs.aspnetzero.com/documents/aspnet-core-angular/latest/Infrastructure-Angular-NSwag