在新创建的 Angular 工作区上运行 ng lint 时出错

ser*_*gpa 7 nomachine-nx node.js eslint angular-cli

我使用以下命令序列创建了一个新的 Angular 工作区:

npx ng new starwars --prefix ts --routing --style scss
cd starwars
npx ng add @ngrx/store@latest # accepting the defaults
npx ng lint # accepting the installation and the defaults
Run Code Online (Sandbox Code Playgroud)

然后,运行ng lint“所有文件都通过列表。”,但随后我收到此错误:

/Users/someuser/Desktop/toyota-starwars/node_modules/@nrwl/devkit/src/utils/convert-nx-executor.js:54 .next() ^

类型错误:iterator.next 不是函数

首先,Nx 到底在里面做什么?是什么导致了这个错误?

我使用的是节点 16.16.0。


当发生完全相同的行为时

  1. 在版本 14.1.3 中设置 Angular 应用程序
  2. 并使用“ng add @angular-eslint/schematics”添加 eslint “@nrwl/devkit”版本为“14.5.8”

Dan*_* C. 5

@nrwl/devkit这是依赖的包中的错误@angular-eslint/builder。已在其 GitHub 存储库中报告了这一点。修复程序刚刚合并到 master 中,可能会包含在下一个(14.5.9?)版本中。

编辑:修复已通过 @angular-eslint/builder v14.0.3 发布(请参阅评论)