ValidationError:进度插件无效选项

时间:2019-06-20 10:10:16

标签: angular command-line-interface angular-ui-bootstrap

error while running angular cli当我从角度cli运行项目时。它告诉我这个错误。 (附有图片)。

我已经更新了我的node_module文件并可以在许多其他平台上搜索,但是...

options should NOT have additional properties
options should pass "instanceof" keyword validation
options should match exactly one schema in oneOf

ValidationError: Progress Plugin Invalid Options

options should NOT have additional properties
options should pass "instanceof" keyword validation
options should match exactly one schema in oneOf[![enter image description here][1]][1]

2 个答案:

答案 0 :(得分:3)

这是由于我的机器上的webpack版本和angular cli版本不匹配而发生的。尝试将项目的webpack降级到版本“ 4.24.0”。最简单的方法是在package.json中将特定版本的webpack添加为dev-dependency:

devDependencies": {
    ...
    "webpack": "4.24.0",
    ...
}

答案 1 :(得分:1)

修复了此文件上的“删除颜色”选项: /node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/common.js 在线:123

更改了此内容

extraPlugins.push(new ProgressPlugin({ profile: buildOptions.verbose, colors: true }));

收件人:

extraPlugins.push(new ProgressPlugin({ profile: buildOptions.verbose }));