我正在将 我的 Angular 应用程序迁移到 NX,并且刚刚设法创建了一些库。现在我想运行
nx affected
命令,例如 nx affected:lint
但它失败并出现以下错误:
nx run Keira3:lint Oops! Something went wrong! :( ESLint: 8.57.0 No files matching the pattern "./src" were found. Please check for typing mistakes in the pattern. Warning: command "eslint ./src" exited with non-zero status code
问题是“Keira3”项目只是
package.json
中根项目的名称,它不是应用程序或库,但由于某些原因NX认为它必须在其上运行lint。
如果我跑步
nx show projects --with-target lint
我得到:
acore-world-model
keira-config
keira-e2e
keira
Keira3
除了最后一个
Keira3
元素之外,其他都是正确的。
这个列表是从哪里生成的?在哪里可以删除/添加元素到这样的列表?
我也遇到这个问题了
我通过删除 Nx 添加到我的
package.json
文件中的这一行来修复它:
"nx": {}