Nativescript error 'Cannot read property 'kind' of undefined' when run 'ng generate component'

前端 未结 2 2024
既然无缘
既然无缘 2021-01-05 20:24

I cannot add a new component to my Nativescript project, when I execute ng generate component faqs it returns the error:

Option "entryCompon         


        
2条回答
  •  太阳男子
    2021-01-05 20:50

    According to https://github.com/NativeScript/nativescript-schematics/issues/302 the solution/workaround is to update typescript to version 4, i.e. run

    npm install --save-dev typescript@4
    

    I tested the following steps, and it seems to work:

    npm i -g @nativescript/schematics
    ng new -c=@nativescript/schematics my-project --shared
    cd my-project
    npm install --save-dev typescript@4
    ng g component bla
    

提交回复
热议问题