While trying to run nx serve
(using NRWL NX) on my TypeScript project, I encountered a build failure with the following error message:
<my-file>.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Debug Failure. False expression: Lexical environment is suspended.
<my-file>.ts
1 has not been modified for some time and was compiling correctly after my last changes a few days ago.
I'm inclined to believe that this issue may be related to a bug in the TS compiler or something similar. Is there any way to identify which specific part of <my-file>.ts
is causing the problem or what types of constructs could potentially trigger this error?
A few details about the setup:
- The
nx serve
command triggers the
executor.@angular-devkit/build-angular:dev-server
- This, in turn, utilizes the
executor for project building.@angular-devkit/build-angular:browser
1: Please note that '<my-file>.ts
' serves as a placeholder here.