Bug Report
Hi all. Relatively new to TypeScript, but just trying to understand this output from tsc but I can't seem to get to the bottom of it. Please see terminal output below after running tsc command - appears error is in library code, rather than in app - but I'd expect a stack trace or similar to find the type error, but in fact there doesn't seem to be one?
Typescript tools in VSCode show no error in any files - does anyone have any idea what is causing this?
🔎 Search Terms
JSON errors, noEmit, tsc type check, version info, circular structure, "parent", "statements"
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about tsc output with noEmit
- Tested on 4.4.3 and typescript@next
💻 Code
> tsc --noEmit
/frontend/node_modules/typescript/lib/tsc.js:88155
return JSON.stringify(buildInfo);
^
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Node'
| property 'statements' -> object with constructor 'Array'
| index 0 -> object with constructor 'Node'
--- property 'parent' closes the circle
at JSON.stringify (<anonymous>)
at getBuildInfoText (/frontend/node_modules/typescript/lib/tsc.js:88155:21)
at emitBuildInfo (/frontend/node_modules/typescript/lib/tsc.js:87960:67)
at emitSourceFileOrBundle (/frontend/node_modules/typescript/lib/tsc.js:87926:13)
at forEachEmittedFile (/frontend/node_modules/typescript/lib/tsc.js:87685:28)
at Object.emitFiles (/frontend/node_modules/typescript/lib/tsc.js:87900:9)
at Object.emitBuildInfo (/frontend/node_modules/typescript/lib/tsc.js:94075:33)
at Object.emitBuildInfo (/frontend/node_modules/typescript/lib/tsc.js:96965:67)
at Object.handleNoEmitOptions (/frontend/node_modules/typescript/lib/tsc.js:95814:25)
at Object.emit (/frontend/node_modules/typescript/lib/tsc.js:97015:29)
🙁 Actual behavior
This should produce output showing where the error is, rather than displaying either this global error, or something is wrong in the library.
🙂 Expected behavior
I'd expect more detailed info, but I might be wrong...?
Bug Report
Hi all. Relatively new to TypeScript, but just trying to understand this output from
tscbut I can't seem to get to the bottom of it. Please see terminal output below after runningtsccommand - appears error is in library code, rather than in app - but I'd expect a stack trace or similar to find the type error, but in fact there doesn't seem to be one?Typescript tools in VSCode show no error in any files - does anyone have any idea what is causing this?
🔎 Search Terms
JSON errors, noEmit, tsc type check, version info, circular structure, "parent", "statements"
🕗 Version & Regression Information
💻 Code
🙁 Actual behavior
This should produce output showing where the error is, rather than displaying either this global error, or something is wrong in the library.
🙂 Expected behavior
I'd expect more detailed info, but I might be wrong...?