Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
错误:节点_modules/@angular/material/form field/index.d.ts中的指令MatFormFieldControl没有选择器,请添加它_Angular_Angular Material - Fatal编程技术网

错误:节点_modules/@angular/material/form field/index.d.ts中的指令MatFormFieldControl没有选择器,请添加它

错误:节点_modules/@angular/material/form field/index.d.ts中的指令MatFormFieldControl没有选择器,请添加它,angular,angular-material,Angular,Angular Material,我正在尝试在digitaloucen上生成ng build--prod,但出现以下错误: ERROR in : Directive MatFormFieldControl in /var/www/frontend/node_modules/@angular/material/form-field/index.d.ts has no selector, please add it! src/app/modules/auth/login/login.component.ts(9,29): error

我正在尝试在digitaloucen上生成ng build--prod,但出现以下错误:

ERROR in : Directive MatFormFieldControl in /var/www/frontend/node_modules/@angular/material/form-field/index.d.ts has no selector, please add it!
src/app/modules/auth/login/login.component.ts(9,29): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.
src/app/shared/modules/dots-table/baselist/base-list.component.ts(4,27): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.
src/app/shared/modules/dots-table/dots-table/dots-table.component.ts(4,27): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.
src/app/shared/modules/dots-table/dots-table.module.ts(3,52): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.
src/app/modules/dashboard/modules/users/users.module.ts(6,52): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.
src/app/modules/dashboard/modules/customer/customer.module.ts(6,52): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.
src/app/modules/dashboard/modules/service/service.module.ts(6,52): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.
src/app/modules/dashboard/modules/project/components/project-detail/project-detail.component.ts(12,95): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.
src/app/modules/dashboard/modules/project/project.module.ts(13,8): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.
src/app/modules/dashboard/modules/technology/technology.module.ts(8,68): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.
src/app/modules/dashboard/dashboard.module.ts(7,49): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.
src/app/app.module.ts(8,47): error TS2306: File '/var/www/frontend/node_modules/@angular/material/index.d.ts' is not a module.

有人能帮我吗?

嗨,你把包放在正确的位置了吗(package.json文件)?也许你只是把devDependencies放进去,应该试着把它移到dependencies字段?我检查过了,在dependencies字段,你能用你的表单代码编辑这个问题吗?模板和ts文件plz