【发布时间】:2021-01-21 22:42:52
【问题描述】:
我无法向我的 Nativescript 项目添加新组件,当我执行 ng generate component faqs 时它返回错误:
Option "entryComponent" is deprecated: Since version 9.0.0 with Ivy, entryComponents is no longer necessary.
Cannot read property 'kind' of undefined
或者如果我像 ng generate component 一样运行它,它会询问我组件名称
? What name would you like to use for the component? faqs
然后返回
Option "entryComponent" is deprecated: Since version 9.0.0 with Ivy, entryComponents is no longer necessary.
Cannot read property 'match' of undefined
我正在使用:
Nativescript 7.0.10
Angular CLI: 10.1.4
Node: 12.18.4
OS: win32 x64
Angular: 10.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1001.4
@angular-devkit/core 10.0.8
@angular-devkit/schematics 10.1.4
@ngtools/webpack 10.1.4
@schematics/angular 10.1.4
@schematics/update 0.1001.4
rxjs 6.6.3
typescript 3.9.7
然后我就跑了:
tns create HelloWorld
npm i --save-dev @angular/cli
npm install --save-dev @nativescript/schematics
npm install --save-dev @schematics/angular
【问题讨论】:
-
你解决了吗?不支持 NativeScript 真的很烦人,即使是简单的事情,比如运行他们的演示项目并在全新安装的中断中创建一个组件,并且任何地方都没有文档。
-
其实不是,我避而远之。我手动创建组件。
标签: angular typescript nativescript nativescript-angular