Angular CLI - Typescript throws: Cannot read property 'length' of undefined

前端 未结 9 2005
春和景丽
春和景丽 2021-02-07 04:24

I run in angular 4 project with ng serve and i get error

Cannot read property \'length\' of undefined

but I don\'t have any property length in

9条回答
  •  北恋
    北恋 (楼主)
    2021-02-07 04:52

    I solved this problem (error during refactoring test). All is good for angular v4.3.* and v4.4*

    1. Change @angular/cli version 1.7.3 to 1.4.10 in package.json (latest for angular4)
    2. rm -rf node_modules
    3. npm install --no-optional

提交回复
热议问题