TypeError: Cannot read property 'flags' of undefined

后端 未结 3 518
深忆病人
深忆病人 2020-12-19 05:35

After cloning a repo, npm install && ionic cordova build android --prod shows me following error.

TypeError: Cannot read pr         


        
相关标签:
3条回答
  • 2020-12-19 06:02

    Removing @angular/cli should work for you

    if not, change Typescript version to ~2.6.2.

    @angular/cli 1.7.3 works with Typescript ~2.6.2 only.

    0 讨论(0)
  • 2020-12-19 06:06

    I'm using angular 5 and ionic v3. For me work these changes:

    "@types/node": "^9.6.55",
    "typescript": "3.7.4",
    "@ionic/app-scripts": "3.2.3",
    

    If your are using @angular/cli or @angular-devkit, in my case I had to remove it in order to build with --prod tag properly.

    Be sure also to remove your node_modules and do npm cache clean -f, then npm i (maybe will be good also remove your package-lock.json)

    0 讨论(0)
  • 2020-12-19 06:14

    Installing angular 9.0.0 solved the problem for me

    npm install @angular/cli@9.0.0 -g
    

    it was breaking for angular 9.1.5

    0 讨论(0)
提交回复
热议问题