{"id":45350,"library":"lsif-sqlite","title":"LSIF SQLite Converter","description":"Converts LSIF (Language Server Index Format) dumps into SQLite databases for querying code intelligence data offline. Stable version 0.5.3, part of the lsif-node project by Microsoft. Accepts LSIF input files and produces a SQLite DB enabling efficient multi-file analysis. Differentiated from other LSIF tools by its focus on SQL persistence rather than in-memory processing.","status":"active","version":"0.5.3","language":"javascript","source_language":"en","source_url":"https://github.com/Microsoft/lsif-node","tags":["javascript","typescript"],"install":[{"cmd":"npm install lsif-sqlite","lang":"bash","label":"npm"},{"cmd":"yarn add lsif-sqlite","lang":"bash","label":"yarn"},{"cmd":"pnpm add lsif-sqlite","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides the SQLite database interface for storing LSIF data","package":"sqlite3","optional":false},{"reason":"Shows progress bars during conversion","package":"progress","optional":true}],"imports":[{"note":"ESM-only; CJS require will fail. The package exports a main function.","wrong":"const lsifSqlite = require('lsif-sqlite')","symbol":"main","correct":"import { lsifSqlite } from 'lsif-sqlite'"},{"note":"Named export, not default.","wrong":"import convertToDb from 'lsif-sqlite'","symbol":"convertToDb","correct":"import { convertToDb } from 'lsif-sqlite'"},{"note":"Named export; available only in ESM context.","wrong":"const transform = require('lsif-sqlite').transform","symbol":"transform","correct":"import { transform } from 'lsif-sqlite'"},{"note":"TypeScript type export; for type annotations only.","wrong":"import LSIFDatabase from 'lsif-sqlite'","symbol":"LSIFDatabase","correct":"import { LSIFDatabase } from 'lsif-sqlite'"}],"quickstart":{"code":"import { convertToDb } from 'lsif-sqlite';\nimport { createReadStream } from 'fs';\nimport { open } from 'sqlite';\nimport sqlite3 from 'sqlite3';\n\nasync function main() {\n  const lsifInput = createReadStream('dump.lsif');\n  const db = await open({\n    filename: 'output.db',\n    driver: sqlite3.Database\n  });\n  await convertToDb(lsifInput, db);\n  console.log('Conversion complete');\n  await db.close();\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Converts an LSIF dump file stream into a SQLite database using the main convertToDb function."},"warnings":[{"fix":"Use async/await or .then() with the new API.","message":"In version 0.4.0, the API changed from callback-based to promise-based. Old code using callbacks will break.","severity":"breaking","affected_versions":">=0.4 <0.5"},{"fix":"Replace transform() with convertToDb() for new code.","message":"The 'transform' function is deprecated in 0.5.0; use 'convertToDb' instead.","severity":"deprecated","affected_versions":">=0.5"},{"fix":"Ensure LSIF dump is compatible with LSIF v1.0 specification.","message":"The package expects LSIF v1.0 format. Using older or newer versions may cause parsing errors.","severity":"gotcha","affected_versions":">=0.3"},{"fix":"Install build tools (python, make, g++) or use 'sql.js' as an alternative.","message":"sqlite3 native module may fail to build on some Node versions. Pre-built binaries are not provided.","severity":"gotcha","affected_versions":"all"},{"fix":"Use streaming and chunking manually, or split the LSIF dump into smaller parts.","message":"Large LSIF dumps (>500MB) may cause out-of-memory errors because the entire input is loaded into memory before processing.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.5.3':22 'accept':32 'analysi':46 'code':16 'convert':3,4 'data':18 'databas':13 'db':40 'differenti':47 'dump':10 'effici':42 'enabl':41 'file':35,45 'focus':54 'format':9 'in-memori':60 'index':8 'input':34 'intellig':17 'javascript':64 'languag':6 'lsif':1,5,27,33,50 'lsif-nod':26 'memori':62 'microsoft':31 'multi':44 'multi-fil':43 'node':28 'offlin':19 'part':23 'persist':57 'process':63 'produc':37 'project':29 'queri':15 'rather':58 'server':7 'sql':56 'sqlite':2,12,39 'stabl':20 'tool':51 'typescript':65 'version':21","created_at":"2026-06-07T12:54:35.677592+00:00","updated_at":"2026-06-07T12:54:35.677592+00:00","problems":[{"fix":"Run 'npm install lsif-sqlite' in your project directory.","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'lsif-sqlite'"},{"fix":"Use 'import { convertToDb } from 'lsif-sqlite'' in an ESM context (type: module in package.json or .mjs file).","cause":"Incorrect import syntax (CommonJS require used with ESM-only package).","error":"TypeError: (0 , lsif_sqlite.convertToDb) is not a function"},{"fix":"Ensure you use the latest version of the package and run the conversion on a fresh database.","cause":"The SQLite database schema is not created or is outdated.","error":"Error: SQLITE_ERROR: no such table: meta"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Microsoft/lsif-node#readme","github":"https://github.com/Microsoft/lsif-node","docs":null,"changelog":null,"pypi":null,"npm":"lsif-sqlite","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}