mtxr / vscode-sqltools

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

Cannot add new connection #1002

Closed mark-me closed 1 year ago

mark-me commented 1 year ago

Hi,

I can't add new connections with version v0.25.1, which works in a previous version (0.24 which is the latest I could find with a release tag). When I click the add connection buttons (both options) nothing happens.

I don't know if it is relevant, but I'm running Visual Code on a Windows 10 Enterprise machine.

Kind regards, Mark

gjsjohnmurray commented 1 year ago

Have you installed the SQLite driver extension? There's a known issue affecting Windows machines using that driver but that haven't had PowerShell 7 installed, so only have Windows PowerShell available.

One solution is to install PowerShell 7 from https://aka.ms/PSWindows

mark-me commented 1 year ago

Thank you very much for your fast reply. I have PowerShell 5.1 installed. I need a system administrator to get 7 on my machine, but as soon as that is done I'll let you know the results

mark-me commented 1 year ago

Hi again,

PowerShell 7.2.6 was installed, but no change: I can't add connections. The output gave me this:

[1664968725830] INFO  (ext): SQLTools is starting
[1664968725834] INFO  (ext): initializing language client...
[1664968725835] INFO  (ext): Detecting node path (if this stalls check Terminal view for the stuck session and kill it)...
    ns: "lc"

The terminal showed this:

node -e 'require(\"fs\").writeFileSync(\"C:\\Users\\mark.zwart\\AppData\\Local\\vscode-sqltools\\Data\\.node-runtime\", process.execPath)' && $(exit 0)
node: The term 'node' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Does that help?

mark-me commented 1 year ago

OK... I found out what it was.... I feel kind of silly now: I needed to install Node.js. It now works like a charm. Thanks for giving me a start in solving this.