typescript-eslint / tslint-to-eslint-config

Converts your TSLint configuration to the closest possible ESLint equivalent. πŸš€

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot --inspect-brk in local development

JoshuaKGoldberg opened this issue Β· comments

Noticed this trying to run locally:

node --inspect-brk ..\tslint-to-eslint-config\bin\tslint-to-eslint-config --editor .vscode\settings.json

Result:

❌ Could not start tslint-to-eslint:{
  result: {
    complaints: [
      'Debugger listening on ws://127.0.0.1:65047/a742392b-3d53-4a81-991a-e59919591e8d\r\n' +
        'For help, see: https://nodejs.org/en/docs/inspector\r\n' +
        'Debugger attached.\r\n' +
        '(node:2368) [INSPECTOR_ASYNC_STACK_TRACES_NOT_AVAILABLE] Warning: Warning: Async stack traces in debugger are not available on 32bit platforms. The feature is disabled.\n' +
        '(Use `node --trace-warnings ...` to show where the warning was created)\n' +
        'Waiting for the debugger to disconnect...\r\n'
    ],
    status: 2
  }
}
 ❌

Interestingly, I see this as a few errors printed in findOriginalConfigurations with a console.log of all the configurations...

{
  eslint: Error: Command failed: eslint --print-config "./.eslintrc.js"
  Debugger listening on ws://127.0.0.1:55694/c03d5cd7-8719-430f-a655-2989de3495c5
  For help, see: https://nodejs.org/en/docs/inspector
  Debugger attached.
  Waiting for the debugger to disconnect...
  node:internal/modules/cjs/loader:944
    throw err;
    ^

  Error: Cannot find module 'v8-compile-cache'
  Require stack:
  - C:\Code\eslint\bin\eslint.js
      at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
      at Function.Module._load (node:internal/modules/cjs/loader:774:27)
      at Module.require (node:internal/modules/cjs/loader:1013:19)
      at require (node:internal/modules/cjs/helpers:93:18)
      at Object.<anonymous> (C:\Code\eslint\bin\eslint.js:13:1)
      at Module._compile (node:internal/modules/cjs/loader:1109:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
      at Module.load (node:internal/modules/cjs/loader:989:32)
      at Function.Module._load (node:internal/modules/cjs/loader:829:14)
      at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ 'C:\\Code\\eslint\\bin\\eslint.js' ]
  }

      at ChildProcess.exithandler (node:child_process:326:12)
      at ChildProcess.emit (node:events:365:28)
      at maybeClose (node:internal/child_process:1067:16)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
   {
    killed: false,
    code: 1,
    signal: null,
    cmd: 'eslint --print-config "./.eslintrc.js"',
    stdout: '',
    stderr: 'Debugger listening on ws://127.0.0.1:55694/c03d5cd7-8719-430f-a655-2989de3495c5\r\n' +
      'For help, see: https://nodejs.org/en/docs/inspector\r\n' +
      'Debugger attached.\r\n' +
      'Waiting for the debugger to disconnect...\r\n' +
      'node:internal/modules/cjs/loader:944\r\n' +
      '  throw err;\r\n' +
      '  ^\r\n' +
      '\r\n' +
      "Error: Cannot find module 'v8-compile-cache'\r\n" +
      'Require stack:\r\n' +
      '- C:\\Code\\eslint\\bin\\eslint.js\r\n' +
      '    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)\r\n' +
      '    at Function.Module._load (node:internal/modules/cjs/loader:774:27)\r\n' +
      '    at Module.require (node:internal/modules/cjs/loader:1013:19)\r\n' +
      '    at require (node:internal/modules/cjs/helpers:93:18)\r\n' +
      '    at Object.<anonymous> (C:\\Code\\eslint\\bin\\eslint.js:13:1)\r\n' +
      '    at Module._compile (node:internal/modules/cjs/loader:1109:14)\r\n' +
      '    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)\r\n' +
      '    at Module.load (node:internal/modules/cjs/loader:989:32)\r\n' +
      '    at Function.Module._load (node:internal/modules/cjs/loader:829:14)\r\n' +
      '    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {\r\n' +
      "  code: 'MODULE_NOT_FOUND',\r\n" +
      "  requireStack: [ 'C:\\\\Code\\\\eslint\\\\bin\\\\eslint.js' ]\r\n" +
      '}\r\n'
  },
  packages: Error: Command failed: cat "./package.json"
  'cat' is not recognized as an internal or external command,
  operable program or batch file.

      at ChildProcess.exithandler (node:child_process:326:12)
      at ChildProcess.emit (node:events:365:28)
      at maybeClose (node:internal/child_process:1067:16)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
   {
    killed: false,
    code: 1,
    signal: null,
    cmd: 'cat "./package.json"',
    stdout: '',
    stderr: "'cat' is not recognized as an internal or external command,\r\n" +
      'operable program or batch file.\r\n'
  },
  tslint: Error: Debugger listening on ws://127.0.0.1:55692/b367546e-d1fd-49d1-b94b-c54fc6bfdc27
  For help, see: https://nodejs.org/en/docs/inspector
  Debugger attached.
  (node:14536) [INSPECTOR_ASYNC_STACK_TRACES_NOT_AVAILABLE] Warning: Warning: Async stack traces in debugger are not available on 32bit platforms. The feature is disabled.
  (Use `node --trace-warnings ...` to show where the warning was created)
  Waiting for the debugger to disconnect...

      at execAndCatch (C:\Code\tslint-to-eslint-config\src\input\findReportedConfiguration.js:22:20)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at Object.findReportedConfiguration (C:\Code\tslint-to-eslint-config\src\input\findReportedConfiguration.js:6:20)
      at Function.all (<anonymous>:null:null)
      at findTSLintConfiguration (C:\Code\tslint-to-eslint-config\src\input\findTSLintConfiguration.js:24:55)
      at Function.all (<anonymous>:null:null)
      at findOriginalConfigurations (C:\Code\tslint-to-eslint-config\src\input\findOriginalConfigurations.js:12:52)
      at Object.runCli (C:\Code\tslint-to-eslint-config\src\cli\runCli.js:41:36)
      at Object.main (C:\Code\tslint-to-eslint-config\src\cli\main.js:10:30)
  ,

Dup of #1150, given the cat issues.