Я решил переместить папки, чтобы организовать модули следующим образом:
Автоматически был изменен app.module.ts
:
app.module.ts с важной частью debug.log
Но, когда я пытаюсь использовать npm install
или ng serve
, я получаю:
ERROR in : Can't resolve all parameters for EmployeesComponent in C:/Users/admin/Desktop/erp-mes-frontend/src/app/staff/employees/employees/employees.component.ts: (?, [object Object]).
src/app/staff/employees/employees/employees.component.ts(2,31): error TS2307: Cannot find module '../../services/employee.service'.
src/app/staff/employees/employees/employees.component.ts(4,24): error TS2307: Cannot find module '../../types'.
src/app/staff/teams/teams/teams.component.ts(3,27): error TS2307: Cannot find module '../services/team.service'.
src/app/staff/teams/teams/teams.component.ts(4,20): error TS2307: Cannot find module '../types'.
src/app/staff/teams/team/team.component.ts(2,27): error TS2307: Cannot find module '../services/team.service'.
src/app/staff/teams/team/team.component.ts(4,20): error TS2307: Cannot find module '../types'.
src/app/production/tasks/tasks/tasks.component.ts(2,27): error TS2307: Cannot find module '../services/task.service'.
src/app/production/tasks/tasks/tasks.component.ts(4,30): error TS2307: Cannot find module '../types'.
src/app/production/tasks/task/task.component.ts(2,27): error TS2307: Cannot find module '../services/task.service'.
src/app/production/tasks/task/task.component.ts(4,20): error TS2307: Cannot find module '../types'.
src/app/production/tasks/add-task/add-task.component.ts(2,36): error TS2307: Cannot find module '../../types'.
src/app/production/tasks/add-task/add-task.component.ts(3,27): error TS2307: Cannot find module '../../services/task.service'.
src/app/production/tasks/add-task/add-task.component.ts(5,31): error TS2307: Cannot find module '../../services/employee.service'.
и т.д. ...
В дополнение к этому IntelliJ предлагает мне:
TS2300: Duplicate identifier 'AppModule' in app.module.ts
и:
ng: Component 'AppComponent' is not included in a module and will not be available inside a template. Consider adding it to a NgModule declaration
или для других компонентов аналогичная ошибкакак:
ng: Can't resolve all parameters for TasksComponent in C:/Users/admin/Desktop/erp-mes-frontend/src/app/production/tasks/tasks/tasks.component.ts: (?, [object Object])
Может ли кто-нибудь помочь?