Typescript: Module build failed: Error: Debug Failure. False expression.

Created on 19 Jun 2018  路  7Comments  路  Source: microsoft/TypeScript

Angular v4 build is failing and outputs the error below. I am using NodeJS v8.4.0. It did not work even after clearing the cache. I am using following versions

"crypto-js": "^3.1.9-1",
"typescript": "^2.9.1",
angular v4.4.7

    Error: ./node_modules/crypto-js/core.js Module build failed: Error: Debug Failure. False expression.    at  
                getJSDocTags 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13173:22)
                   at  getFirstJSDocTag 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13181:24)
                   at  Object.getJSDocTypeTag 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13130:19)
                   at  checkParenthesizedExpression 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45552:56)
                   at  checkExpressionWorker 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45600:28)
                   at  checkExpression 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45533:42)
                   at  checkBinaryLikeExpression 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45082:29)
                   at  checkBinaryExpression 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45074:20)
                   at  checkExpressionWorker 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45626:28)
                   at  checkExpression 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45533:42)
                @ ./node_modules/crypto-js/index.js 5:43-60 @ ./src/shared/services/encryptDecrypt.service.ts @ 
                ./src/app/app.module.ngfactory.ts @ ./src/app/main.ts,./node_modules/crypto-js/cipher-core.js Module build 
                failed: Error: Debug Failure. False expression.    at  getJSDocTags 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13173:22)
                   at  getFirstJSDocTag 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13181:24)
                   at  Object.getJSDocTypeTag 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13130:19)
                   at  checkParenthesizedExpression 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45552:56)
                   at  checkExpressionWorker 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45600:28)
                   at  checkExpression 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45533:42)
                   at  checkBinaryLikeExpression 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45082:29)
                   at  checkBinaryExpression 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45074:20)
                   at  checkExpressionWorker 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45626:28)
                   at  checkExpression 
                (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45533:42)
                @ ./node_modules/crypto-js/index.js 5:389-413 @ ./src/shared/services/encryptDecrypt.service.ts @ 
                ./src/app/app.module.ngfactory.ts @ ./src/app/main.ts 
    Error: ./node_modules/crypto-js/core.js
    Module build failed: Error: Debug Failure. False expression.
           at  getJSDocTags (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13173:22)
           at  getFirstJSDocTag (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13181:24)
           at  Object.getJSDocTypeTag (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13130:19)
           at  checkParenthesizedExpression (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45552:56)
           at  checkExpressionWorker (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45600:28)
           at  checkExpression (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45533:42)
           at  checkBinaryLikeExpression (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45082:29)
           at  checkBinaryExpression (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45074:20)
           at  checkExpressionWorker (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45626:28)
           at  checkExpression (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45533:42)
     @ ./node_modules/crypto-js/index.js 5:43-60
     @ ./src/shared/services/encryptDecrypt.service.ts
     @ ./src/app/app.module.ngfactory.ts
     @ ./src/app/main.ts,./node_modules/crypto-js/cipher-core.js
    Module build failed: Error: Debug Failure. False expression.
           at  getJSDocTags (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13173:22)
           at  getFirstJSDocTag (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13181:24)
           at  Object.getJSDocTypeTag (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:13130:19)
           at  checkParenthesizedExpression (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45552:56)
           at  checkExpressionWorker (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45600:28)
           at  checkExpression (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45533:42)
           at  checkBinaryLikeExpression (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45082:29)
           at  checkBinaryExpression (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45074:20)
           at  checkExpressionWorker (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45626:28)
           at  checkExpression (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/typescript/lib/typescript.js:45533:42)
     @ ./node_modules/crypto-js/index.js 5:389-413
     @ ./src/shared/services/encryptDecrypt.service.ts
     @ ./src/app/app.module.ngfactory.ts
     @ ./src/app/main.ts
           at  new BuildError (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
           at  callback (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/@ionic/app-scripts/dist/webpack.js:119:28)
           at  emitRecords.err (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/webpack/lib/Compiler.js:269:13)
           at  Compiler.emitRecords (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/webpack/lib/Compiler.js:375:38)
           at  emitAssets.err (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/webpack/lib/Compiler.js:262:10)
           at  applyPluginsAsyncSeries1.err (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/webpack/lib/Compiler.js:368:12)
           at  next (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/tapable/lib/Tapable.js:200:11)
           at  Compiler.compiler.plugin (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
           at  Compiler.applyPluginsAsyncSeries1 (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/tapable/lib/Tapable.js:204:13)
           at  Compiler.afterEmit (/home/builder/hudson/workspace/developer03669-recvue_stationapp_26025.ats-dev-master/node_modules/webpack/lib/Compiler.js:365:9)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] build: `ionic-app-scripts build`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed    at  the [email protected] build script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/builder/.npm/_logs/2018-06-19T05_41_42_560Z-debug.log
    Archiving artifacts
    Finished: FAILURE
Bug Fixed

Most helpful comment

I am facing this issue too, for Angular 6.1.x as we have to use TypeScript 2.9.x so we cannot upgrade to the latest version. I also tried with the latest Angular version 7.x and TS 3.1.3 but this issue still occurs.

Waiting for resolutions

All 7 comments

Looks like a duplicate of #24963. Can you try typescript@next?

@DanielRosenwasser It still did not work.

24997 is a much better solution to the assert you're hitting. I tried compiling crypto-js and succeeded with master (and failed with 2.9.2); can you try with tomorrow's typescript@next?

@jindalrohit did it finally work somehow?

I'm getting this with the following in an angular@6 project:

"devDependencies": {
    "@angular-devkit/build-angular": "^0.6.8",
    "@angular-devkit/build-optimizer": "^0.6.8",
    "crypto-js": "^3.1.9-1",
    "typescript": "^2.9.2",
}

Confusing!

I am facing this issue too, for Angular 6.1.x as we have to use TypeScript 2.9.x so we cannot upgrade to the latest version. I also tried with the latest Angular version 7.x and TS 3.1.3 but this issue still occurs.

Waiting for resolutions

@stormit-vn Can you post your 7.x + 3.1.3 errors on the thread in #24963? (These issues are all duplicates of each other). I can manually compile crypto-js with 3.0 and 3.1, so I wonder whether the assert is getting hit someplace else.

Was this page helpful?
0 / 5 - 0 ratings