D:\dev\node\node_modules\ts-node\src\index.ts:820
return new TSError(diagnosticText, diagnosticCodes);
^
TSError: ⨯ Unable to compile TypeScript:
demo.ts:11:1 - error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.
11 console.log(n)
~~~~~~~
at createTSError (D:\dev\nvm\v12.5.0\node_modules\ts-node\src\index.ts:820:12)
at reportTSError (D:\dev\nvm\v12.5.0\node_modules\ts-node\src\index.ts:824:19)
at getOutput (D:\dev\nvm\v12.5.0\node_modules\ts-node\src\index.ts:1014:36)
at Object.compile (D:\dev\nvm\v12.5.0\node_modules\ts-node\src\index.ts:1322:43)
at Module.m._compile (D:\dev\nvm\v12.5.0\node_modules\ts-node\src\index.ts:1454:30)
at Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Object.require.extensions.<computed> [as .ts] (D:\dev\nvm\v12.5.0\node_modules\ts-node\src\index.ts:1458:12)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:839:10) {
diagnosticCodes: [ 2584 ]
}