repackaged plugin commands don't work
Before submitting your bug report
- [X] I believe this is a bug. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: windows 11
- Continue: 0.9.151
- IDE: vscode 1.90.0
Description
when trying to repackage the plugin, after downloading the repackaged version, all of the functionalities don't work. i get command 'continue.focusContinueInput' not found when trying to use ctrl L, the chat doesn't load, and when trying to select files as context, i get this
To reproduce
install all of the dependenceis using yarn run the vsce package command: vsce package --allow-star-activation --no-dependencies --yarn --no-git-tag-version --githubBranch v0.9.151-vscode --allow-missing-repository install the package from vsix and try to run it.
Log output
it says version 0.9.141 though i used the 0.9.151 branch
workbench.desktop.main.js:sourcemap:1847 Activating extension 'Continue.continue' failed: Could not locate the bindings file. Tried:
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\build\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\build\Debug\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\build\Release\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\out\Debug\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\Debug\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\out\Release\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\Release\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\build\default\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\compiled\20.9.0\win32\x64\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\addon-build\release\install-root\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\addon-build\debug\install-root\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\addon-build\default\install-root\node_sqlite3.node
→ c:\Users\elada\.vscode\extensions\continue.continue-0.9.141\lib\binding\node-v121-win32-x64\node_sqlite3.node.
@eladamittai This means that the native dependencies were not packaged.
See here for full environment setup steps, but the important ones for building on your own are npm run prepackage and npm run package in the extensions/vscode folder
The prepackage.js script (called by npm run prepackage is responsible for downloading sqlite, lancedb, esbuild, and other native dependencies into the correct locations, otherwise you would expect to see errors like above
@sestinj hey, thanks for the quick reply. I followed both the steps you gave me and the steps in the guide, yet i kept recieving this error:
> [email protected] package
> node scripts/package.js
C:\Users\elada\elad-projects\continue\extensions\vscode\scripts\package.js:24
if (error) throw error;
^
Error: Command failed: npx vsce package --out ./build patch --no-dependencies
(node:4428) [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] Could not resolve "./lib/source-map-generator"
../../core/node_modules/source-map/source-map.js:6:37:
6 │ ...nerator = require('./lib/source-map-generator').SourceMapGenerator;
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "./lib/source-map-consumer"
../../core/node_modules/source-map/source-map.js:7:36:
7 │ ...pConsumer = require('./lib/source-map-consumer').SourceMapConsumer;
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "./lib/source-node"
../../core/node_modules/source-map/source-map.js:8:29:
8 │ exports.SourceNode = require('./lib/source-node').SourceNode;
╵ ~~~~~~~~~~~~~~~~~~~
C:\Users\elada\elad-projects\continue\extensions\vscode\node_modules\esbuild\lib\main.js:1636
let error = new Error(`${text}${summary}`);
^
Error: Build failed with 3 errors:
../../core/node_modules/source-map/source-map.js:6:37: ERROR: Could not resolve "./lib/source-map-generator"
../../core/node_modules/source-map/source-map.js:7:36: ERROR: Could not resolve "./lib/source-map-consumer"
../../core/node_modules/source-map/source-map.js:8:29: ERROR: Could not resolve "./lib/source-node"
at failureErrorWithLog (C:\Users\elada\elad-projects\continue\extensions\vscode\node_modules\esbuild\lib\main.js:1636:15)
at C:\Users\elada\elad-projects\continue\extensions\vscode\node_modules\esbuild\lib\main.js:1048:25
at C:\Users\elada\elad-projects\continue\extensions\vscode\node_modules\esbuild\lib\main.js:993:52
at buildResponseToResult (C:\Users\elada\elad-projects\continue\extensions\vscode\node_modules\esbuild\lib\main.js:1046:7)
at C:\Users\elada\elad-projects\continue\extensions\vscode\node_modules\esbuild\lib\main.js:1075:16
at responseCallbacks.<computed> (C:\Users\elada\elad-projects\continue\extensions\vscode\node_modules\esbuild\lib\main.js:697:9)
at handleIncomingPacket (C:\Users\elada\elad-projects\continue\extensions\vscode\node_modules\esbuild\lib\main.js:752:9)
at Socket.readFromStdout (C:\Users\elada\elad-projects\continue\extensions\vscode\node_modules\esbuild\lib\main.js:673:7)
at Socket.emit (node:events:520:28)
at addChunk (node:internal/streams/readable:559:12) {
errors: [
{
detail: undefined,
id: '',
location: {
column: 37,
file: '../../core/node_modules/source-map/source-map.js',
length: 28,
line: 6,
lineText: "exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;",
namespace: '',
suggestion: ''
},
notes: [],
pluginName: '',
text: 'Could not resolve "./lib/source-map-generator"'
},
{
detail: undefined,
id: '',
location: {
column: 36,
file: '../../core/node_modules/source-map/source-map.js',
length: 27,
line: 7,
lineText: "exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;",
namespace: '',
suggestion: ''
},
notes: [],
pluginName: '',
text: 'Could not resolve "./lib/source-map-consumer"'
},
{
detail: undefined,
id: '',
location: {
column: 29,
file: '../../core/node_modules/source-map/source-map.js',
length: 19,
line: 8,
lineText: "exports.SourceNode = require('./lib/source-node').SourceNode;",
namespace: '',
suggestion: ''
},
notes: [],
pluginName: '',
text: 'Could not resolve "./lib/source-node"'
}
],
warnings: []
}
Node.js v22.2.0
ERROR npm failed with exit code 1
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at ChildProcess.exithandler (node:child_process:421:12)
at ChildProcess.emit (node:events:520:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: 1,
killed: false,
signal: null,
cmd: 'npx vsce package --out ./build patch --no-dependencies'
}
i tried it with the new 0.9.163-vscode version, plus the 0.9.151 and 0.9.140 versions. i tried to download the lib package with npm in the core folder and to add it to the package.json, yet it didn't work.
Is there an update? I tried to add it in the core folder because this is where it was said to be missing, but it still didn't work.
@sestinj I'm facing the same issue, but it's not a dev build. I'm using the release package from the VSCode store.
It gives me errors on each command and also the handler errors.
No handler for message type "config/getSerializedProfileInfo"
I tried installing the previous VSCode version (1.91.1) and the previous extension version (0.9.195), but that didn't work. Tried removing all extensions as well. What could cause the problem? It occurs only on my Windows machine.
@MaxRev-Dev Can you share what version of Continue you are using?
@sestinj
Continue: v0.9.207 (latest). Tried 0.9.195 and 0.8.50. Disabled all installed extensions and only "Continue" is enabled. Also, as I mentioned above, I tried to remove the extensions folder.
VSCode:
Version: 1.93.0 (user setup)
Commit: 4849ca9bdf9666755eb463db297b69e5385090e3
Date: 2024-09-04T13:02:38.431Z
Electron: 30.4.0
ElectronBuildId: 10073054
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631
For any command I get the following (similar error related to binaries):
Ok, very interesting. I probably should have asked this at first, but would you also be able to share the logs? You can find them with ctrl+shift+p, "Toggle Developer Tools". My guess is there's a problem with native dependencies on this particular version of Windows
@sestinj, here are the logs. The Webview didn't show anything interesting. This one is from the extension host.
I narrowed it down to getGlobalContextFilePath(). What is the context path in this case?
I don't remember changing any configs that would break it.
2024-09-10 18:16:52.545 [error] Activating extension Continue.continue failed due to an error:
2024-09-10 18:16:52.545 [error] SyntaxError: Unexpected token 'nul', "nulnul....." is not valid JSON.
at JSON.parse (<anonymous>)
at GlobalContext.get (c:\Users\User\.vscode\extensions\continue.continue-0.9.207\out\extension.js:103063:29)
at new Core (c:\Users\User\.vscode\extensions\continue.continue-0.9.207\out\extension.js:516162:30)
I found the path ~/.continue/index/globalContext.json in this issue https://github.com/continuedev/continue/issues/2026.
The file was empty. I suppose my PC was improperly shut down due to a blackout. But I think, in this case, the extension should recreate the file. When I deleted it and restarted the extension host, the file was recreated, and everything works now.
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!