mtxr / vscode-sqltools

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

sqltools with sqlite asks to install sqlite3@5.1.1, click the install button and it circles back #1323

Closed Albro3459 closed 2 months ago

Albro3459 commented 2 months ago

Describe the bug

On Mac M3 on vscode, have npm and node fully updated, have sqlite3 installed at 5.1.1 and tried at 5.1.7. Sqltools thinks 5.1.1 is not installed.

Steps to Reproduce

Click the connect button next to connection from settings.json. SqlTools prompts to install sqlite@5.1.1, click the button and it runs npm install sqlite3@5.1.1 && exit 0 in /Users/myusername/Library/Application Support/vscode-sqltools. Then says that it is installed. Try to connect again and get "SqlTools prompts to install sqlite@5.1.1" again. Endless circle

My Attempts

Tried removing sqltools and sqltools sqllite extensions and reinstalling after restarting vscode. Tried uninstalling and reinstalling sqlite3. Nothing worked. There are no errors in the SQLtools output I don't think. It's just stuff like: [1713517394869] INFO (ext): EXECUTING COMMAND => sqltools.getConnections [1713517394869] INFO (ls): REQUEST RECEIVED => connection/GetConnectionsRequest [1713517394870] INFO (ls): REQUEST RECEIVED => connection/GetConnectionsRequest [1713517394870] INFO (ext): Connection explorer changed. Will be updated. ns: "conn-man:explorer"

Idk what that means, but doesn't seem like an error

Workaround, not a fix obviously

opened /Users/myusername/Library/Application Support/vscode-sqltools opened package-lock.json changed requires in line 4 to false do the same thing in project package-lock.json it works.

Expected behavior

Correctly detect the installed sqlite3 in current project, if its not there, install in the correct directory and actually work

Screenshots

sqltools broken broken pop up

MaxBook Air M3 24 gb ram 1tb disk:

Albro3459 commented 2 months ago

I literally undid this: opened /Users/myusername/Library/Application Support/vscode-sqltools opened package-lock.json changed requires in line 4 to false do the same thing in project package-lock.json it works.

meaning I set them back to true and reloaded and it works now so idk wtf was happening but it somehow fixed itself