theseanl / tscc

A collection of tools to seamlessly bundle, minify Typescript with Closure Compiler
MIT License
161 stars 11 forks source link

Debug Failure. Could not determine parsed source file. #822

Open mjones-vsat opened 1 year ago

mjones-vsat commented 1 year ago

Dependencies (happens on both 0.8 and 0.9; 0.7 is fine)

  "dependencies": {
    "@tscc/tscc": "^0.8.0",
    "google-closure-compiler-java": "20230103.0.0",
    "typescript": "^4.9.4",
    "uglify-js": "^3.17.4"
  }

Invocation:

cd "$input" && exec tscc \
    --prefix "$output" \
    --debug.persistArtifacts=true \
    -- \
    -- \
    --language_out=ECMASCRIPT5_STRICT

Error:

TSCC: tsickle uses a custom tslib optimized for closure compiler. importHelpers flag is set.
TSCC: The compilation has terminated with an unexpected error.
TSCC: Error: Debug Failure. Could not determine parsed source file.
    at getOrCreateEmitNode (node_modules/typescript/lib/typescript.js:28086:157)
    at Object.setSyntheticLeadingComments (node_modules/typescript/lib/typescript.js:28223:9)
    at Object.synthesizeLeadingComments (node_modules/tsickle/out/src/jsdoc.js:316:12)
    at node_modules/tsickle/out/src/fileoverview_comment_transformer.js:146:55
    at node_modules/tsickle/out/src/tsickle.js:173:20
    at transformSourceFileOrBundle (node_modules/@tscc/tscc/node_modules/typescript/lib/typescript.js:90654:68)
    at transformation (node_modules/@tscc/tscc/node_modules/typescript/lib/typescript.js:109638:24)
    at transformRoot (node_modules/@tscc/tscc/node_modules/typescript/lib/typescript.js:109665:82)
    at Object.transformNodes (node_modules/@tscc/tscc/node_modules/typescript/lib/typescript.js:109649:78)
    at emitJsFileOrBundle (node_modules/@tscc/tscc/node_modules/typescript/lib/typescript.js:110316:32)