I'm facing the below-mentioned issue while generating production build after using @twilio/Conversations.
ERROR in ../node_modules/twilsock/builds/browser.js
Module build failed (from ../node_modules/@angular-devkit/build-angular/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
TypeError: Cannot read property 'flags' of undefined
at resolveNameHelper (/Users/khushbu.raval/Host-FA/Flamingo/hellohealthy.webui/HelloHealthy/HelloHealthy/HelloHealthy.WebUI/node_modules/typescript/lib/typescript.js:32155:45)
at resolveName (/Users/khushbu.raval/Host-FA/Flamingo/hellohealthy.webui/HelloHealthy/HelloHealthy/HelloHealthy.WebUI/node_modules/typescript/lib/typescript.js:31829:20)
It is working with ng build but not with ng build --prod
Versions:
Steps already performed to resolve error but still not working:
Solution: I've migrated Angular from version 7 to 8.2.14 to resolve this issue & it worked.
Now I can generate prod build successfully after using Angular V8.
Versions Used: