projen
projen copied to clipboard
TS Error on latest builds
On our latest scheduled upgrade builds, we are seeing this TS error:
Run npx projen build
👾 build » default | node .projenrc.js
👾 build » post-compile » synth:silent | cdk synth -q
/home/runner/work/cdk-ml-pilot/cdk-ml-pilot/node_modules/typescript/lib/typescript.js:42530
ts.Debug.assert(typeof typeReferenceDirectiveName === "string", "Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");
^
Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.
at Object.resolveTypeReferenceDirective (/home/runner/work/cdk-ml-pilot/cdk-ml-pilot/node_modules/typescript/lib/typescript.js:42530:18)
at /home/runner/work/cdk-ml-pilot/cdk-ml-pilot/node_modules/ts-node/src/index.ts:623:55
at Array.map (<anonymous>)
at Object.resolveTypeReferenceDirectives (/home/runner/work/cdk-ml-pilot/cdk-ml-pilot/node_modules/ts-node/src/index.ts:622:33)
at actualResolveTypeReferenceDirectiveNamesWorker (/home/runner/work/cdk-ml-pilot/cdk-ml-pilot/node_modules/typescript/lib/typescript.js:116611:163)
at resolveTypeReferenceDirectiveNamesWorker (/home/runner/work/cdk-ml-pilot/cdk-ml-pilot/node_modules/typescript/lib/typescript.js:116911:26)
at processTypeReferenceDirectives (/home/runner/work/cdk-ml-pilot/cdk-ml-pilot/node_modules/typescript/lib/typescript.js:118393:31)
at findSourceFileWorker (/home/runner/work/cdk-ml-pilot/cdk-ml-pilot/node_modules/typescript/lib/typescript.js:118278:21)
at findSourceFile (/home/runner/work/cdk-ml-pilot/cdk-ml-pilot/node_modules/typescript/lib/typescript.js:118133:26)
at /home/runner/work/cdk-ml-pilot/cdk-ml-pilot/node_modules/typescript/lib/typescript.js:118085:85
Subprocess exited with error 1
👾 Task "build » post-compile » synth:silent" failed when executing "cdk synth -q" (cwd: /home/runner/work/cdk-ml-pilot/cdk-ml-pilot)
Could be caused by these PRs? https://github.com/projen/projen/pull/1881 or https://github.com/projen/projen/pull/1882
Those two PRs would have fixed new projects created with projen, but not existing ones.
To fix an existing project you could run:
npm install --save-dev ts-node@^10
or yarn add --dev ts-node@^10
and then run projen again
you can fix this by adding to .projenrc.js
project.addDevDeps('ts-node@^10');
Issue is resolved.