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:
- Angular: 7.2.2
- Node: 12.14.1
- @twilio-conversations: 2.1.0
Steps already performed to resolve error but still not working:
- Downgrading @twilio/conversations version.
- Upgrading angular-cli, typescript version.
- Delete & reinstall node-modules.