There are no typescript errors but every time I start my vite server, it crashes after a few hmr updates. All I see is this:
node:internal/event_target:1090
process.nextTick(() => { throw err; });
^
Error: Debug Failure. False expression.
at getOptionalType (/Users/c/project/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/typescript.js:70825:11)
at tryReuseExistingTypeNode (/Users/c/project/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/typescript.js:54296:16)
at serializeTypeForDeclaration (/Users/c/project/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/typescript.js:56314:61)
at addPropertyToElementList (/Users/c/project/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/typescript.js:55284:43)
at createTypeNodesFromResolvedType (/Users/c/project/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/typescript.js:55180:11)
at createTypeNodeFromObjectType (/Users/c/project/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/typescript.js:54955:25)
at visitAndTransformType (/Users/c/project/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/typescript.js:54878:24)
at createAnonymousTypeNode (/Users/c/project/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/typescript.js:54818:20)
at typeToTypeNodeWorker (/Users/c/project/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/typescript.js:54611:16)
at typeToTypeNodeHelper (/Users/c/project/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/typescript.js:54392:24)
Node.js v22.7.0
Warning: command "vite serve" exited with non-zero status code
The getOptionalType function crashes on line Debug.assert(strictNullChecks) because I have strict: false in my tsconfig.
Reproduction
I haven't yet narrowed down a way to reproduce the issue because this is a nx monorepo. I will add it if I find a way. Here is the --showConfig output.
Describe the bug
There are no typescript errors but every time I start my vite server, it crashes after a few hmr updates. All I see is this:
The getOptionalType function crashes on line
Debug.assert(strictNullChecks)
because I have strict: false in my tsconfig.Reproduction
I haven't yet narrowed down a way to reproduce the issue because this is a nx monorepo. I will add it if I find a way. Here is the --showConfig output.
Expected behavior
No crash
System Info
Additional context
No response
Validations