Closed Jordan466 closed 1 year ago
@Jordan466 unless you are using the SQLite driver, please use Settings Editor to make sure your sqltools.useNodeRuntime
setting is either false
or entirely absent from your JSON-format settings. This should prevent the error from occurring.
I think the change you are proposing may not be one we want to merge. @mtxr is better placed to comment, but as I understand it the purpose of the &&
is to prevent the exit
command from being executed if the node
command fails. However there are challenges in getting this behaviour on all the different shells we might encounter. Is Windows PowerShell your default shell for VS Code?
This seems to happen in Powershell, i have the same issue. And yes im using the SQLite driver.
@Attacler are you using Windows PowerShell, or have you upgraded to PowerShell (see https://aka.ms/PSWindows)?
Using it, did not upgrade to it
Using it, did not upgrade to it
And I assume you are using SQLTools 0.25.1, correct?
@Attacler
What output do you get from that command?
@gjsjohnmurray
@Attacler was that run in a VS Code Terminal?
Please search Settings Editor with this string:
@id:terminal.integrated.defaultProfile.windows
What is yours set to?
Does the list include an option named "PowerShell" as well as one called "Windows PowerShell"? Or only the latter.
Notice how the path at the foot of the dropdown when I highlight "PowerShell" shows a path that includes the number 7.
If you don't have that entry please go to https://aka.ms/PSWindows and follow the instructions about installing PS 7. Then restart VS Code and try the SQLite driver again after making sure the setting shown above is either "null" or "PowerShell".
@Jordan466 this PR is obsoleted by #1000 so I'm closing it without merging. Nevertheless thanks for getting involved in making SQLTools better.
@gjsjohnmurray It was marked as null.
After putting it on Windows powershell, it was the same.
Also getting the error on CMD.
@Attacler thanks for the info.
Installing PowerShell 7 should resolve this.
If you can't or don't want to do that, here's a workaround.
List the contents of the file c:\Users\bartd\AppData\Local\vscode-sqltools\Data\.node-runtime
It should be C:\Program Files\nodejs\node.exe
or similar.
Use that string as the value of the sqltools.useNodeRuntime
setting in your settings.json. You will need to double the backslashes, e.g.
"sqltools.useNodeRuntime": "C:\\Program Files\\nodejs\\node.exe",
@Jordan466 this PR is obsoleted by #1000 so I'm closing it without merging. Nevertheless thanks for getting involved in making SQLTools better.
All good. Thank you addressing 🙏
Hello. I get the following error in my vscode console on startup.
The command seems to work more reliably if we use a ; as a statement separator instead of &&