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

前端 未结 9 2004
春和景丽
春和景丽 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:50

    In my case, it's mysterious. But it won't hurt to offer what I had witnessed and maybe a bit history. None or maybe some historical event might have caused it but I really don't know.

    • Everything is good. Angular 8 running inside 18.04.4 LTS (Bionic Beaver)LXC within 19.10 ubuntu host with npm 6.14.2, node10.16.3
    • Upgraded host to 20.04 LTS(Focal Fossa). Write some code. Remove a package called angular-shepherd. Try to build --prod. This errors shows up during angular Generating ES5 bundles.
    • Tried everything. All failed.
    • Reset what I did inside the project. Still fail.
    • Reboot LXC.
    • Fixed.

提交回复
热议问题