gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
error <PROJECT_DIR>\node_modules\hnswlib-node: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: <PROJECT_DIR>\node_modules\hnswlib-node
Output:
<PROJECT_DIR>\node_modules\hnswlib-node>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules
\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@16.15.1 | win32 | x64
gyp info find Python using Python version 3.10.10 found at "<AppData>\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe"
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
URL付きで説明してくれているが、node-gypによるビルドにVisual C++ build toolsが必要。これまた初期化してからインストールしていなかった。
Error: Wrong space name, expected "l2" or "ip".
at Function.getHierarchicalNSW (<PROJECT_DIR>\node_modules\langchain\src\vectorstores\hnswlib.ts:53:12)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at HNSWLib.initIndex (<PROJECT_DIR>\node_modules\langchain\src\vectorstores\hnswlib.ts:61:20)
at HNSWLib.addVectors (<PROJECT_DIR>\node_modules\langchain\src\vectorstores\hnswlib.ts:85:5)
at Function.fromDocuments (<PROJECT_DIR>\node_modules\langchain\src\vectorstores\hnswlib.ts:195:5)
at run (<PROJECT_DIR>\ingest.ts:77:23)
at <anonymous> (<PROJECT_DIR>\ingest.ts:82:3)
error Command failed with exit code 1.
You should only use hyperlinks that are explicitly listed as a source in the context. Do NOT make up a hyperlink that is not listed.
If you don't know the answer, just say "Hmm, I'm not sure." Don't try to make up an answer.