Search code examples
angularpdfmake

ng build for prod failed because pdfmake


I am running Angular 6.1.4 project with pdfmake 0.1.63 (tried the latest version 0.1.66 as well). When I run ng build --prod , I encounter the following issue

    ERROR in ./node_modules/pdfmake/build/pdfmake.js                                                                                                                    
Module build failed: Error: Debug Failure. False expression.                                                                                                        
    at getJSDocTags (C:\webdevx2\gmp\ISP-Lite\public\admin-build\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:13197:22)

Any help will be appreciated


Solution

  • Not able to identify the root cause. But solve the problem by downgrading to pdfmake 0.1.41 without breaking the code.

    pdfmake 0.1.41