Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 5 tasks
JVT038 opened this issue Sep 19, 2022 · 3 comments
Closed
1 of 5 tasks
Labels

Comments

@JVT038
Copy link

JVT038 commented Sep 19, 2022

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):

  • SQLTools Version: v0.25.1
  • VS Code Version: 1.71.2 (user setup)
  • OS: Windows 10
  • Driver:
    • PostgreSQL/Redshift
    • MySQL/MariaDB
    • MSSQL/Azure
    • SQLite
    • Other? Which...
  • Database version: 10.4.24-MariaDB
@JVT038 JVT038 added the triage label Sep 19, 2022
@gjsjohnmurray
Copy link
Collaborator

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

@JVT038
Copy link
Author

JVT038 commented Sep 19, 2022

That fixed it, thanks.

@JVT038 JVT038 closed this as completed Sep 19, 2022
@Aldo-f
Copy link

Aldo-f commented Oct 18, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants