skipSelector 未定义

skipSelector not defined

我试图在 angular 中创建一个新组件,但遇到了这个错误

ng g c contact-us
Your global Angular CLI version (8.1.1) is greater than your local
version (7.1.4). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
skipSelector is not defined

无法在线找到答案。我 运行 这段代码在我的 angular 项目

的 app 文件夹中

您的 package.json

中有旧的 angular/cli 包

要更新使用:

npm r angular-cli
npm i @angular/cli@latest -D

运行 此命令与 package.json

处于同一级别