1

I wrote a very simple Typescript file and called it "app2.ts".

I created the following launcher in IntelliJ:

enter image description here

When I run this launcher, everything works properly. However, when I run it in debug mode, I get the following error in console:

(function (exports, require, module, __filename, __dirname) {

SyntaxError: Invalid or unexpected token at new Script (vm.js:80:7) at createScript (vm.js:274:10) at Object.runInThisContext (vm.js:326:10) at Module._compile (internal/modules/cjs/loader.js:664:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at Module._preloadModules (internal/modules/cjs/loader.js:824:12)

Do you know what is the problem and why the configuration works in run mode, and doesn't work in debug mode?

CrazySynthax
  • 13,662
  • 34
  • 99
  • 183
  • Good to refer: https://stackoverflow.com/questions/50203953/syntaxerror-invalid-or-unexpected-token-at-createscript-vm-js8010 – Mebin Joe Apr 01 '19 at 11:07
  • @MebinJoe, I read it. If it were an encoding issue, the program wouldn't pass in run mode. – CrazySynthax Apr 01 '19 at 11:10
  • 1
    Please create a support ticket and attach a project that can be used to recreate the issue – lena Apr 01 '19 at 12:38

0 Answers0