Open
Description
Bug Report
🔎 Search Terms
debug failure, false expression, at object.first
🕗 Version & Regression Information
- This is a crash
- This is the behavior in every version I tried, 4.9.5, and I reviewed the FAQ for entries about it
- I was unable to test this on prior versions because I had other issues with prior versions that made me update to a later version
⏯ Playground Link
Playground link with relevant code
💻 Code
stack trace:
/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:99615
throw e;
^
Error: Debug Failure. False expression.
at Object.first (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:990:18)
at getSpecifierForModuleSymbol (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:45313:36)
at serializeAsAlias (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:46419:107)
at serializeSymbolWorker (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:46084:25)
at serializeSymbol (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:45978:25)
at /Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:45963:29
at Map.forEach (<anonymous>)
at visitSymbolTable (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:45962:81)
at symbolTableToDeclarationStatements (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:45847:17)
at /Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:44127:106
Node.js v18.11.0
source: node_modules/typescript/lib/tsc.js
ts.firstOrUndefined = firstOrUndefined;
first(array) {
ts.Debug.assert(array.length !== 0);
return array[0];
}
ts.first = first;
tsconfig.json:
{
"compilerOptions": {
"module": "ES2020",
"moduleResolution": "node",
"allowJs": true,
"checkJs": false,
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"target": "ES2022",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"rootDir": "./",
"incremental": true,
"skipLibCheck": true,
"strict": true,
"strictNullChecks": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictBindCallApply": true,
"alwaysStrict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"paths": {
"@/shared/*": ["backend-services-shared/src/*"], // contains .js files
"@/utils/*": ["src/utils/*"],
"@/modules/*": ["src/modules/*"]
}
},
"exclude": ["node_modules", "test", "dist"]
}
🙁 Actual behavior
Error happens when I turn on allowJs
🙂 Expected behavior
allowJs
shouldn't crash build process and should include the js files from the source in the build output 😔