ValidationError:进度插件无效选项

Tay*_*yat 11 command-line-interface angular-ui-bootstrap angular

运行 Angular cli 时出错当我从 Angular 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]
Run Code Online (Sandbox Code Playgroud)

Yur*_*ura 7

由于我的机器上的 webpack 和 Angular cli 版本不匹配,我发生了这种情况。尝试将您的项目的 webpack 降级到版本“4.24.0”。最简单的方法是在 package.json 中添加特定版本的 webpack 作为开发依赖项:

devDependencies": {
    ...
    "webpack": "4.24.0",
    ...
}
Run Code Online (Sandbox Code Playgroud)

  • 这解决了我的问题,或者至少让我看到另一个错误消息:) (3认同)

Omk*_*thi 1

当 @angular-devkit/build-angular 是旧版本(在我的例子中是 0.8.0)时,会出现此错误,我将其升级到较新的版本 0.13.7 并且它有效。为了避免在构建应用程序时出现连续问题,请确保 webpack 版本 >=4.29