mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.48k stars 297 forks source link

None of the buttons do something and an error with detecting node runtime #983

Closed JVT038 closed 1 year ago

JVT038 commented 1 year ago

Describe the bug When I start vscode, I instantly see this error in my terminal:

C:\xampp\htdocs\project>node -e 'require(\"fs\").writeFileSync(\"C:\\Users\\user\\AppData\\Local\\vscode-sqltools\\Data\\.node-runtime\", process.execPath)' && exit 0
[eval]:1
'require("fs").writeFileSync("C:\\Users\\user\\AppData\\Local\\vscode-sqltools\\Data\\.node-runtime",
'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:257:10)
    at Object.runInThisContext (node:vm:305:10)
    at node:internal/process/execution:75:19
    at [eval]-wrapper:6:22
    at evalScript (node:internal/process/execution:74:60)
    at node:internal/main/eval_string:27:3

Also, I've navigated to the directory, and turns out the .node-runtime file doesn't exist, which is probably why there's an error.

To Reproduce Steps to reproduce the behavior:

  1. Open vscode
  2. See error

Expected behavior I expected the extension to work normally, not show this error

Desktop (please complete the following information):

gjsjohnmurray commented 1 year ago

Please use Settings Editor to make sure your sqltools.useNodeRuntime setting is either false or entirely absent from your JSON-format settings.

JVT038 commented 1 year ago

That fixed it, thanks.

Aldo-f commented 1 year ago

Got the same error. It's indeed fixed by removing that setting, or setting it to false.

Does that setting comes automatically inside the settings.json? Don't think that I manually added it.