How to fix 'lance.connect is not a function' when indexing codebase in Continue VS Code?
Continue 1.0.23 on macOS Sequoia with VS Code 1.103.1 fails codebase indexing with TypeError: lance.connect is not a function, both as UI warnings and in the extension host console. Clean reinstalls of VS Code, the extension, and ~/.continue did not help. Is there a working fix or do I need to downgrade?
Originally asked on GitHub: https://github.com/continuedev/continue/issues/7192
6 answers
This is a packaging bug: the Continue VS Code extension is missing the native LanceDB module (
@lancedb/vectordb-darwin-arm64) andworkerpool. The GitHub issue was closed as not planned, and users still saw it in 1.1.80 and 1.2.0, so existing installs are not reliably fixed.Workaround that works (confirmed by multiple users):
- Find the extension directory, e.g.
~/.vscode/extensions/continue.continue-1.2.0-darwin-arm64/out(on Apple Silicon macOS; the path includes the installed version). - Run:
shcd ~/.vscode/extensions/continue.continue-1.2.0-darwin-arm64/out npm install @lancedb/vectordb-darwin-arm64 workerpool- Restart VS Code or reload the window after installing (general step; the thread does not explicitly say so).
This was reported as fixing both the indexing warnings and the
lance.connect is not a functionstack trace in 1.2.0.Other options that worked for some users:
- Downgrade to Continue
1.0.21, which several users confirmed fixes the issue. - On 1.2.0, uninstall the extension, delete the leftover extension folders, and reinstall fresh; one user found the fresh install then included
lancedb,workerpool, andripgrep.
Installing
@lancedb/vectordb-darwin-arm64globally did not work; it still left the warnings and blocked indexing.Did this work for you?- Find the extension directory, e.g.
What @PaulWeinsberg tried on GitHub (Worked)
A user fixed it in 1.2.0 by running
npm install @lancedb/vectordb-darwin-arm64 workerpoolinside the extension'soutdirectory. Multiple users confirmed this worked.Source: https://github.com/continuedev/continue/issues/7192#issuecomment-3227191768 (opens external site)
Did this work for you?What @jmouriscathibault tried on GitHub (Worked)
Downgraded the Continue extension to version 1.0.21; codebase indexing worked again.
Source: https://github.com/continuedev/continue/issues/7192#issuecomment-3195468994 (opens external site)
Did this work for you?What @agahr5012 tried on GitHub (Worked)
A fresh 1.2.0 install after uninstalling the extension and deleting local extension folders included
lancedb,workerpool, andripgrep, so the problem appeared solved on a clean install.Source: https://github.com/continuedev/continue/issues/7192#issuecomment-3235010253 (opens external site)
Did this work for you?What @riandoza tried on GitHub (Didn't work)
Installing
@lancedb/vectordb-darwin-arm64globally still produced thelance.connect is not a functionwarning and did not fix indexing; downgrading to 1.0.21 did.Source: https://github.com/continuedev/continue/issues/7192#issuecomment-3215516322 (opens external site)
Did this work for you?What @PaulWeinsberg tried on GitHub (Didn't work)
Reporter uninstalled VS Code, the Continue extension, deleted
~/.continue, and tried pre-release and older versions; none fixed the error.Source: https://github.com/continuedev/continue/issues/7192 (opens external site)
Did this work for you?
Related questions
- Continue error with Llama via LiteLLM: Cannot set properties of undefined (setting 'parsedArgs')
- Continue 1.1.45-1.1.47: Gemini agent mode fails with 400 INVALID_ARGUMENT 'alwaysApply'
- How to enable Agent mode (tool use) for LM Studio models in Continue?
- How to make Continue's @folder/@codebase send full file contents?
- MCP tool call times out at 60s even with connectionTimeout set in Continue