Error building with ng build --prod. Fine without --prod flag and ng serve
问题 I have a project that built fine with ng build --prod until I upgraded the version of TypeScript from 2.72 to 2.92 in my package.json. After upgrading, I now get the following error: ERROR in Cannot read property 'Symbol(Symbol.iterator)' of undefined However, the project builds fine using ng build and runs fine using ng serve so I have no idea where this problem is occurring and the error doesn't tell me where the problem is in my project. 回答1: I found the issue. Using resolveJsonModule