question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to install sqlite3 npm package

See original GitHub issue

Describe the bug

I am unable to install the sqlite3 npm package, because there is a loop of the extension asking to install it.

I am able to install the sqlite3 npm package outside of vscode in an arbitrary directory using npm install sqlite3@4.2.0.

[1610487207492] INFO  (ext): EXECUTING COMMAND => sqltools.selectConnection
[1610487207492] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487207492] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1610487207494] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487207495] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1610487207496] INFO  (ls): REQUEST RECEIVED => connection/ConnectRequest
[1610487207496] INFO  (ls): Connection instance created for database.
    ns: "conn-manager"
[1610487207502] ERROR (ls): Connecting error: {"code":1000,"data":{"notification":"Core/missingModule","dontNotify":true,"args":{"conn":{"previewLimit":50,"driver":"SQLite","database":"${workspaceFolder:project}/data/database.sqlite","name":"database","isActive":false,"isConnected":false,"id":"database|SQLite||${workspaceFolder:project}\\data\\database:sqlite"},"action":"install","deps":[{"type":"package","name":"sqlite3","version":"4.2.0"}]}}}
    ns: "conn-manager"
[1610487207505] INFO  (ext): Connection explorer changed. Will be updated.
    ns: "conn-man:explorer"
[1610487207507] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487207507] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1610487209186] INFO  (ls): REQUEST RECEIVED => DependencyInstaller/install
[1610487209186] INFO  (ls): Will install sqlite3 package
    ns: "dep-man"

up to date, audited 69 packages in 2s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities
[1610487211461] INFO  (ls): Finished sqlite3 script
    ns: "dep-man"
[1610487211461] INFO  (ls): Finished installing deps
    ns: "dep-man"
[1610487212553] INFO  (ext): EXECUTING COMMAND => sqltools.selectConnection
[1610487212553] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487212553] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1610487212554] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487212554] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1610487212555] INFO  (ls): REQUEST RECEIVED => connection/ConnectRequest
[1610487212555] INFO  (ls): Connection instance created for database.
    ns: "conn-manager"
[1610487212560] ERROR (ls): Connecting error: {"code":1000,"data":{"notification":"Core/missingModule","dontNotify":true,"args":{"conn":{"previewLimit":50,"driver":"SQLite","database":"${workspaceFolder:project}/data/database.sqlite","name":"database","isActive":false,"isConnected":false,"id":"database|SQLite||${workspaceFolder:project}\\data\\database:sqlite"},"action":"install","deps":[{"type":"package","name":"sqlite3","version":"4.2.0"}]}}}
    ns: "conn-manager"
[1610487212561] INFO  (ext): Connection explorer changed. Will be updated.
    ns: "conn-man:explorer"
[1610487212575] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487212575] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest

To Reproduce Steps to reproduce the behavior:

  1. Install sqltools and sqlite3 driver extensions
  2. Connect to sqlite database
  3. Message: “You need to install “sqlite3@4.2.0” to connect to <database>.”. Click “Install Now”
  4. Message: ““sqlite3@4.2.0” installed! Go ahead and connect!”. Click “Connect to <database>”.
  5. goto 3

Expected behavior

Installs sqlite3 package and opens database

Screenshots N/A

Desktop (please complete the following information):

  • SQLTools Version 0.23.0
  • VSCode Version: 1.52.1
  • OS: Windows
  • Driver:
    • PostgreSQL/Redshift
    • MySQL/MariaDB
    • MSSQL/Azure
    • SQLite 0.2.0
    • Other? Which…
  • Database version: sqlite

Additional context N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
jamesmyattcommented, Jan 28, 2021

As suggested by @magic-lantern, I’ve fixed this by deleting the “node_modules” and “package-lock.json” from C:\Users\<username>\AppData\Local\vscode-sqltools\Data

However, I don’t get any tables, which is a separate issue.

1reaction
mtxrcommented, Mar 22, 2021

Here are the paths:

macOS: ~/Library/Application Support/vscode-sqltools Windows: %LOCALAPPDATA%\vscode-sqltools\Data (for example, C:\Users\USERNAME\AppData\Local\vscode-sqltools\Data) Linux: ~/.local/share/vscode-sqltools (or $XDG_DATA_HOME/vscode-sqltools)

This can vary based on each machine setup, I hope making the path explicity here can help you guys fix/debug it so we can find a better solution for this problem.

I’m doing an improvement on dependencies installer code to use vscode terminal instead of spawning a shell to install deps. This will fix issues for most of the setups

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install sqlite3 dependency with npm - node.js
If my package.json has only "sqlite3": "^5.0.2" (no any other lib) then npm install works. But if I add all other libs that...
Read more >
sqlite3 - npm
Source install​​ The sqlite3 module depends only on libsqlite3. However, by default, an internal/bundled copy of sqlite will be built and ...
Read more >
There was an error initializing DB: "SQLite package has not ...
That looks like npm has not installed sqlite3 I suspect the sqlite3 node package has been updated and for some reason it is...
Read more >
Problem installing sqlite3 - Node.js - Codecademy Forums
worked perfectly (4.1.1 is the latest sqlite version on npmjs.com). After this, just run npm install again. 34 Likes. How to ...
Read more >
NPM is throwing a bunch of errors when I try to install SQLite3
I installed both sequelize and sqlite without any issues. I installed them through the dependencies in package.json with npm install rather than ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found