Angular 9 mat-progress-buttons error: ERROR in Failed to compile entry-point mat-progress-buttons (es2015 as esm2015) due to compilation errors
Angular 9 mat-progress-buttons error: ERROR in Failed to compile entry-point mat-progress-buttons (es2015 as esm2015) due to compilation errors
从 Angular 8 更新到 Angular 9 后,下面给出的 mat-progress-button 出现错误。
它与 Angular 8 一起工作正常。MatProgressButton 是否与 Angular 9 不兼容?
node_modules/mat-progress-buttons/esm2015/mat-progress-buttons.js:181:26 - error NG1010: Value at position 1 in the NgModule.imports of MatProgressButtonsModule is not a reference: [object Object]
导入看起来像:
import { MatProgressButtonsModule } from 'mat-progress-buttons';
我的 package.json 看起来像这样:
"dependencies": {
"@angular/animations": "^9.0.2",
"@angular/cdk": "^9.1.0",
"@angular/common": "~9.0.2",
"@angular/compiler": "~9.0.2",
"@angular/core": "~9.0.2",
"@angular/forms": "~9.0.2",
"@angular/material": "^9.1.0",
...
"@angular/router": "~9.0.2",
"core-js": "^2.5.4",
"mat-file-upload": "^1.3.2",
"mat-progress-buttons": "^8.0.7",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.3",
"@angular/cli": "~9.0.3",
"@angular/compiler-cli": "~9.0.2",
"@angular/language-service": "~9.0.2",
...
"typescript": "^3.7.5"
}
}
我遇到了同样的问题。似乎已安装模块的版本存在某种错误。我通过删除解决了它
node_module
文件夹并用 npm install
.
重新启动它
已删除 node_modules 文件夹、dist 文件夹和 package-lock。json 文件
npm cache clean --force
npm cache verify
npm i
然后它对我有用!
从 Angular 8 更新到 Angular 9 后,下面给出的 mat-progress-button 出现错误。 它与 Angular 8 一起工作正常。MatProgressButton 是否与 Angular 9 不兼容?
node_modules/mat-progress-buttons/esm2015/mat-progress-buttons.js:181:26 - error NG1010: Value at position 1 in the NgModule.imports of MatProgressButtonsModule is not a reference: [object Object]
导入看起来像:
import { MatProgressButtonsModule } from 'mat-progress-buttons';
我的 package.json 看起来像这样:
"dependencies": {
"@angular/animations": "^9.0.2",
"@angular/cdk": "^9.1.0",
"@angular/common": "~9.0.2",
"@angular/compiler": "~9.0.2",
"@angular/core": "~9.0.2",
"@angular/forms": "~9.0.2",
"@angular/material": "^9.1.0",
...
"@angular/router": "~9.0.2",
"core-js": "^2.5.4",
"mat-file-upload": "^1.3.2",
"mat-progress-buttons": "^8.0.7",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.3",
"@angular/cli": "~9.0.3",
"@angular/compiler-cli": "~9.0.2",
"@angular/language-service": "~9.0.2",
...
"typescript": "^3.7.5"
}
}
我遇到了同样的问题。似乎已安装模块的版本存在某种错误。我通过删除解决了它
node_module
文件夹并用 npm install
.
已删除 node_modules 文件夹、dist 文件夹和 package-lock。json 文件
npm cache clean --force
npm cache verify
npm i
然后它对我有用!