Fixing LanceDB Error on Windows

Fixing LanceDB Uncaught Execption on Windows


If you're on Windows and do not have C++ installed you may experience an error when opening Reor for the first time:

Error: vectordb: failed to load native library.
 You may need to run `npm install @lancedb/vectordb-win32-x64-msvc`.
 
  If that does not work, please file a bug report at https://github.com/lancedb/lancedb/issues
 
  Source error: Error: The specified module could not be found.
\\?\C:\Users\samto\Desktop\reor\node_modules\@lancedb\vectordb-win32-x64-msvc\index.node
    at Object.<anonymous> (C:\Users\samto\Desktop\reor\node_modules\vectordb\native.js:26:11)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1326:10)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at Module._load (node:internal/modules/cjs/loader:967:12)
    at c._load (node:electron/js2c/node_init:2:13672)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (C:\Users\samto\Desktop\reor\node_modules\vectordb\dist\query.js:19:25)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)

This is happening because LanceDB requires some C++ libraries to be installed on your system. To fix, please download and run the following: MSVS C++ redist.

Alternatively, you can install the same libraries by installing the Visual Studio Build Tools. (This is a slightly larger install the MSVS).