continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
19.43k stars 1.69k forks source link

Get error when run Core Binary : Could not locate the bindings file. No debugger available, can not send 'variables' #2986

Closed AfterStories closed 2 days ago

AfterStories commented 3 days ago

Before submitting your bug report

Relevant environment info

- OS:WINDOWS X64
- Continue version:main branch
- IDE version:ideaIC-2021.1.3.win
- NODEJS :V22.11.0

Description

I want to try to run the JetBrains extension locally. According to the description in the CONTRIBUTING.md file in the main branch, I first executed the install-all-dependencies task. Then, according to the description in the extensions\intellij\CONTRIBUTING.md file, I started "Core Binary" in VS Code Then I got following error message : C:\node-v22.11.0-win-x64\node.exe .\out\index.js Process exited with code 1 Uncaught Error Error: Could not locate the bindings file. Tried: → C:\Users\hzheng057\Desktop\Code\continue\binary\build\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\build\Debug\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\build\Release\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\out\Debug\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\Debug\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\out\Release\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\Release\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\build\default\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\compiled\22.11.0\win32\x64\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\addon-build\release\install-root\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\addon-build\debug\install-root\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\addon-build\default\install-root\node_sqlite3.node → C:\Users\hzheng057\Desktop\Code\continue\binary\lib\binding\node-v127-win32-x64\node_sqlite3.node at bindings (c:\Users\hzheng057\Desktop\Code\continue\core\node_modules\bindings\bindings.js:126:9) at ../core/node_modules/sqlite3/lib/sqlite3-binding.js (c:\Users\hzheng057\Desktop\Code\continue\core\node_modules\sqlite3\lib\sqlite3-binding.js:1:18) at require (c:\Users\hzheng057\Desktop\Code\continue\binary\out\index.js:18:51) at ../core/node_modules/sqlite3/lib/sqlite3.js (c:\Users\hzheng057\Desktop\Code\continue\core\node_modules\sqlite3\lib\sqlite3.js:2:17) at require (c:\Users\hzheng057\Desktop\Code\continue\binary\out\index.js:18:51) at (c:\Users\hzheng057\Desktop\Code\continue\core\util\devdataSqlite.ts:3:21) at (/internal/modules/cjs/loader:1546:14) at (/internal/modules/cjs/loader:1689:10) at (/internal/modules/cjs/loader:1318:32) at (/internal/modules/cjs/loader:1128:12) at traceSync (/diagnostics_channel:315:14) at wrapModuleLoad (/internal/modules/cjs/loader:218:24) at executeUserEntryPoint (/internal/modules/run_main:170:5) at (/internal/main/run_main_module:36:49) bindings.js:126

From the error content, I think the required files are not built in the binary folder, so I went to the binary folder and executed the npm run build command, and the following error message :

(base) PS C:\Users\hzheng057\Desktop\Code\continue\binary> npm run build

binary@1.0.0 build node build.js

[info] Downloading prebuilt lancedb... [info] Downloading for win32-x64... Copying @lancedb/vectordb-win32-x64-msvc to @lancedb npm warn using --force Recommended protections disabled. Contents of: @lancedb/vectordb-win32-x64-msvc [ 'vectordb-win32-x64-msvc' ] [info] Copied tree-sitter.wasm [info] Copied llamaTokenizerWorkerPool.mjs [info] Copied llamaTokenizer.mjs [info] Copied tiktokenWorkerPool.mjs [info] Cleaning up artifacts from previous builds... [info] Building with esbuild... [info] Building binaries with pkg... [info] Building win32-x64... (node:24792) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) Error executing command 'npx pkg --no-bytecode --public-packages "*" --public pkgJson/win32-x64 --out-path bin/win32-x64': ,> pkg@5.8.1

Fetching base Node.js binaries to PKG_CACHE_PATH Not found in remote cache: {"tag":"v3.4","name":"node-v18.5.0-win-x64"} Building base binary from source: built-v18.5.0-win-x64 Fetching Node.js source archive from nodejs.org... Error! AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

(0, assert_1.default)(!this.bar)

at Log.enableProgress (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\log.js:64:30)
at C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:58:31
at step (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:33:23)
at Object.next (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:14:53)
at C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:8:71
at new Promise (<anonymous>)
at __awaiter (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:4:12)
at downloadUrl (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:53:12)
at C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\build.js:142:66
at step (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\build.js:44:23)

,(node:24792) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created)

The node version I use is V22, and I also set the node version in binary\package.json: "targets": [ "node22-win-x64" ],

**But I saw in the error message that it seems to be looking for the v18 version of node {"tag":"v3.4","name":"node-v18.5.0-win-x64"}

I don't know if this error is caused by node version , or the pkg config issues ? For the current problem I'm facing, could you help me check how I can solve this error and Launchthe plugin?**

To reproduce

install-all-dependencies then, Core Binary

Log output

Launch"Core Binary" in VS Code:
C:\node-v22.11.0-win-x64\node.exe .\out\index.js
Process exited with code 1
Uncaught Error Error: Could not locate the bindings file. Tried:
 → C:\Users\hzheng057\Desktop\Code\continue\binary\build\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\build\Debug\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\build\Release\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\out\Debug\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\Debug\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\out\Release\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\Release\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\build\default\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\compiled\22.11.0\win32\x64\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\addon-build\release\install-root\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\addon-build\debug\install-root\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\addon-build\default\install-root\node_sqlite3.node
 → C:\Users\hzheng057\Desktop\Code\continue\binary\lib\binding\node-v127-win32-x64\node_sqlite3.node
    at bindings (c:\Users\hzheng057\Desktop\Code\continue\core\node_modules\bindings\bindings.js:126:9)
    at ../core/node_modules/sqlite3/lib/sqlite3-binding.js (c:\Users\hzheng057\Desktop\Code\continue\core\node_modules\sqlite3\lib\sqlite3-binding.js:1:18)
    at __require (c:\Users\hzheng057\Desktop\Code\continue\binary\out\index.js:18:51)
    at ../core/node_modules/sqlite3/lib/sqlite3.js (c:\Users\hzheng057\Desktop\Code\continue\core\node_modules\sqlite3\lib\sqlite3.js:2:17)
    at __require (c:\Users\hzheng057\Desktop\Code\continue\binary\out\index.js:18:51)
    at <anonymous> (c:\Users\hzheng057\Desktop\Code\continue\core\util\devdataSqlite.ts:3:21)
    at <anonymous> (<node_internals>/internal/modules/cjs/loader:1546:14)
    at <anonymous> (<node_internals>/internal/modules/cjs/loader:1689:10)
    at <anonymous> (<node_internals>/internal/modules/cjs/loader:1318:32)
    at <anonymous> (<node_internals>/internal/modules/cjs/loader:1128:12)
    at traceSync (<node_internals>/diagnostics_channel:315:14)
    at wrapModuleLoad (<node_internals>/internal/modules/cjs/loader:218:24)
    at executeUserEntryPoint (<node_internals>/internal/modules/run_main:170:5)
    at <anonymous> (<node_internals>/internal/main/run_main_module:36:49)
bindings.js:126

=====================================================

npm run build in the binary folder:

(base) PS C:\Users\hzheng057\Desktop\Code\continue\binary> npm run build

> binary@1.0.0 build
> node build.js

[info] Downloading prebuilt lancedb...
[info] Downloading for win32-x64...
Copying @lancedb/vectordb-win32-x64-msvc to @lancedb
npm warn using --force Recommended protections disabled.
Contents of: @lancedb/vectordb-win32-x64-msvc [ 'vectordb-win32-x64-msvc' ]
[info] Copied tree-sitter.wasm
[info] Copied llamaTokenizerWorkerPool.mjs
[info] Copied llamaTokenizer.mjs
[info] Copied tiktokenWorkerPool.mjs
[info] Cleaning up artifacts from previous builds...
[info] Building with esbuild...
[info] Building binaries with pkg...
[info] Building win32-x64...
(node:24792) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error executing command 'npx pkg --no-bytecode --public-packages "*" --public pkgJson/win32-x64 --out-path bin/win32-x64':  ,> pkg@5.8.1
> Fetching base Node.js binaries to PKG_CACHE_PATH
> Not found in remote cache:
  **{"tag":"v3.4","name":"node-v18.5.0-win-x64"}**
> Building base binary from source:
  built-v18.5.0-win-x64
> Fetching Node.js source archive from nodejs.org...
> Error! AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  (0, assert_1.default)(!this.bar)

    at Log.enableProgress (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\log.js:64:30)
    at C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:58:31
    at step (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:33:23)
    at Object.next (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:14:53)
    at C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:4:12)
    at downloadUrl (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\utils.js:53:12)
    at C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\build.js:142:66
    at step (C:\Users\hzheng057\Desktop\Code\continue\binary\node_modules\pkg-fetch\lib-es5\build.js:44:23)
,(node:24792) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Patrick-Erichsen commented 2 days ago

It seems like the install scripts may not have completed. Were you able to run the IntelliJ configuration tasks mentioned here? https://github.com/continuedev/continue/blob/main/extensions/intellij/CONTRIBUTING.md#running-the-extension-in-debug-mode