vscode-sqltools: nodeJS syntax error prevents SQLTools from being functional

Describe the bug Error occurs if nodeJS runtime is enabled.

To Reproduce Steps to reproduce the behavior: 1.Set "sqltools.useNodeRuntime": true 2. Reload VSCode 3. A new default terminal gets opened at VSCode startup:
image 4. An error similar to this occurs (in the example Command Prompt is the default terminal) is present in the terminal:

D:\dir>node -e 'require(\"fs\").writeFileSync(\"C:\\Users\\user\\AppData\\Local\\vscode-sqltools\\Data\\.node-runtime\", process.execPath)' && exit 0     Data\\.node-runtime\", process.execPath)' && exit 0
[eval]:1
'require("fs").writeFileSync("C:\\Users\\user\\AppData\\Local\\vscode-sqltools\\Data\\.node-runtime",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: Invalid or unexpected token
    at new Script (node:vm:100:7)
    at createScript (node:vm:265:10)
    at Object.runInThisContext (node:vm:313:10)
    at node:internal/process/execution:79:19
    at [eval]-wrapper:6:22
    at evalScript (node:internal/process/execution:78:60)
    at node:internal/main/eval_string:28:3

Node.js v18.12.0

The list of currently set connections is not present image

After pushing “Add New Connection” and a pal period (e.g., 1 min.) additional error occurs as a pop-up: image

Expected behavior No error, fully functional SQLTools extension.

Desktop (please complete the following information):

  • SQLTools Version 0.25.1
  • VS Code Version: 1.72.2
  • OS: Windows 10

Additional context This issue appeared when I tried to connect to an SQLite database.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 26

Most upvoted comments

Just I’m not sure about @mikes-gh’s issue: is it solved too? Is it the same issue?

That’s different. I created #1036 for it.