【发布时间】:2019-02-22 22:25:28
【问题描述】:
自动更改app.module.ts:
app.module.ts with important part of 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])
有人可以帮忙吗?
【问题讨论】:
-
您到底对什么感到困惑?你移动了文件。该错误表明这些文件不再存在。它们确实没有——你只是移动了它们。那个错误让你困惑的是什么?
标签: angular npm build angular-components angular-module