Open zoobab opened 5 months ago
@zoobab This should be solved on the preview branch. It was a matter of renaming a folder that had a naming conflict with the "pkg" dependency. Let me know if not and I'll take another look!
I tried now the preview branch, but got other errors:
#8 18.31 + echo 'Installing GUI extension dependencies...'
#8 18.31 + pushd gui
#8 18.31 + npm install
#8 31.37
#8 31.37 added 550 packages, and audited 552 packages in 13s
#8 31.37
#8 31.37 213 packages are looking for funding
#8 31.37 run `npm fund` for details
#8 31.37
#8 31.37 found 0 vulnerabilities
#8 31.40 + npm link @continuedev/core
#8 33.60
#8 33.60 added 1 package, and audited 553 packages in 2s
#8 33.60
#8 33.60 213 packages are looking for funding
#8 33.60 run `npm fund` for details
#8 33.60
#8 33.60 found 0 vulnerabilities
#8 33.61 + npm run build
#8 33.85
#8 33.85 > build
#8 33.85 > tsc && vite build
#8 33.85
#8 45.96 ../extensions/vscode/src/autocomplete/lsp.ts(1,34): error TS2307: Cannot find module 'core' or its corresponding type declarations.
#8 45.96 ../extensions/vscode/src/autocomplete/lsp.ts(2,45): error TS2307: Cannot find module 'core/autocomplete/ast' or its corresponding type declarations.
#8 45.96 ../extensions/vscode/src/autocomplete/lsp.ts(3,37): error TS2307: Cannot find module 'core/autocomplete/ranking' or its corresponding type declarations.
#8 45.96 ../extensions/vscode/src/autocomplete/lsp.ts(4,41): error TS2307: Cannot find module 'core/commands/util' or its corresponding type declarations.
#8 45.96 ../extensions/vscode/src/autocomplete/lsp.ts(5,25): error TS2307: Cannot find module 'vscode' or its corresponding type declarations.
#8 45.96 ../extensions/vscode/src/util/expandSnippet.ts(1,28): error TS2307: Cannot find module 'core' or its corresponding type declarations.
#8 45.96 ../extensions/vscode/src/util/expandSnippet.ts(2,37): error TS2307: Cannot find module 'core/indexing/ignore' or its corresponding type declarations.
#8 45.96 ../extensions/vscode/src/util/expandSnippet.ts(3,34): error TS2307: Cannot find module 'core/util' or its corresponding type declarations.
#8 45.96 ../extensions/vscode/src/util/expandSnippet.ts(4,34): error TS2307: Cannot find module 'core/util/treeSitter' or its corresponding type declarations.
#8 45.96 src/hooks/useSetup.ts(77,5): error TS2554: Expected 2-3 arguments, but got 1.
#8 ERROR: process "/bin/sh -c bash -x ./install-dependencies.sh" did not complete successfully: exit code: 2
------
> [4/4] RUN bash -x ./install-dependencies.sh:
45.96 ../extensions/vscode/src/autocomplete/lsp.ts(1,34): error TS2307: Cannot find module 'core' or its corresponding type declarations.
45.96 ../extensions/vscode/src/autocomplete/lsp.ts(2,45): error TS2307: Cannot find module 'core/autocomplete/ast' or its corresponding type declarations.
45.96 ../extensions/vscode/src/autocomplete/lsp.ts(3,37): error TS2307: Cannot find module 'core/autocomplete/ranking' or its corresponding type declarations.
45.96 ../extensions/vscode/src/autocomplete/lsp.ts(4,41): error TS2307: Cannot find module 'core/commands/util' or its corresponding type declarations.
45.96 ../extensions/vscode/src/autocomplete/lsp.ts(5,25): error TS2307: Cannot find module 'vscode' or its corresponding type declarations.
45.96 ../extensions/vscode/src/util/expandSnippet.ts(1,28): error TS2307: Cannot find module 'core' or its corresponding type declarations.
45.96 ../extensions/vscode/src/util/expandSnippet.ts(2,37): error TS2307: Cannot find module 'core/indexing/ignore' or its corresponding type declarations.
45.96 ../extensions/vscode/src/util/expandSnippet.ts(3,34): error TS2307: Cannot find module 'core/util' or its corresponding type declarations.
45.96 ../extensions/vscode/src/util/expandSnippet.ts(4,34): error TS2307: Cannot find module 'core/util/treeSitter' or its corresponding type declarations.
45.96 src/hooks/useSetup.ts(77,5): error TS2554: Expected 2-3 arguments, but got 1.
@zoobab thanks again for sending the whole logs and making this easy! I reproduced, made the fix, and have now pushed the changes to preview: https://github.com/continuedev/continue/commit/27a9aa89e38e3bab8816ee52683cd90cd81a723f, https://github.com/continuedev/continue/commit/0f7aed6f4845d04e9f76af7a06091ce8b2ed0b26
As always, let me know if any other problems come up : )
Despite your 2 commits, I still have the same issue with "../extensions/vscode/src/autocomplete/lsp.ts(1,34): error TS2307: Cannot find module 'core' or its corresponding type declarations." ...
I think they may be a circular dependency between gui
and extensions
, I installed/built them repeatedly one after the other until they both complete successfully. It seems to go gui
-> core
-> extensions
-> gui
, here maybe?:
Introduced by #1088 I believe
Envrionment:
OS: Windows 10 cargo 1.76.0 (c84b36747 2024-01-18) node v20.12.1 yarn 1.22.18 commit: 301263930f096cd82b82b95d0e20584663c62a5e
Reproduce step: ./install-dependencies.ps1
Error Log: ......
pkg@1.0.0 build node build.js
[info] Copied [info] Downloading prebuilt lancedb... [info] Downloading darwin-x64... npm WARN using --force Recommended protections disabled. [info] Downloading darwin-arm64... npm WARN using --force Recommended protections disabled. [info] Downloading linux-x64... npm WARN using --force Recommended protections disabled. [info] Downloading linux-arm64... npm WARN using --force Recommended protections disabled. [info] Downloading win32-x64... npm WARN using --force Recommended protections disabled. [info] Building with esbuild... ▲ [WARNING] "./xhr-sync-worker.js" should be marked as external for use with "require.resolve" [require-resolve-not-external]
../core/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:31:57:
31 │ const syncWorkerFile = require.resolve ? require.resolve("./xhr-sync-worker.js") : null;
╵ ~~~~~~~~~~~~~~~~~~~~~~
[info] Building binaries with pkg... [info] Building darwin-x64... node:internal/errors:984 const err = new Error(message); ^
Error: Command failed: npx pkg --no-bytecode --public-packages "*" --public pkgJson/darwin-x64 --out-path bin/darwin-x64 at genericNodeError (node:internal/errors:984:15) at wrappedFn (node:internal/errors:538:14) at checkExecSyncError (node:child_process:890:11) at execSync (node:child_process:962:15) at D:\2024\open_source\CodeGen_C\continue_github\continue\pkg\build.js:122:5 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { status: 2, signal: null, output: [ null, Buffer(263) [Uint8Array] [ 62, 32, 112, 107, 103, 64, 53, 46, 56, 46, 49, 10, 62, 32, 70, 101, 116, 99, 104, 105, 110, 103, 32, 98, 97, 115, 101, 32, 78, 111, 100, 101, 46, 106, 115, 32, 98, 105, 110, 97, 114, 105, 101, 115, 32, 116, 111, 32, 80, 75, 71, 95, 67, 65, 67, 72, 69, 95, 80, 65, 84, 72, 10, 62, 32, 78, 111, 116, 32, 102, 111, 117, 110, 100, 32, 105, 110, 32, 114, 101, 109, 111, 116, 101, 32, 99, 97, 99, 104, 101, 58, 10, 32, 32, 123, 34, 116, 97, 103, 34, ... 163 more items ], Buffer(0) [Uint8Array] [] ], pid: 33652, stdout: Buffer(263) [Uint8Array] [ 62, 32, 112, 107, 103, 64, 53, 46, 56, 46, 49, 10, 62, 32, 70, 101, 116, 99, 104, 105, 110, 103, 32, 98, 97, 115, 101, 32, 78, 111, 100, 101, 46, 106, 115, 32, 98, 105, 110, 97, 114, 105, 101, 115, 32, 116, 111, 32, 80, 75, 71, 95, 67, 65, 67, 72, 69, 95, 80, 65, 84, 72, 10, 62, 32, 78, 111, 116, 32, 102, 111, 117, 110, 100, 32, 105, 110, 32, 114, 101, 109, 111, 116, 101, 32, 99, 97, 99, 104, 101, 58, 10, 32, 32, 123, 34, 116, 97, 103, 34, ... 163 more items ], stderr: Buffer(0) [Uint8Array] [] }
Node.js v20.12.1
I was able to workaround the circular dependency build failure by adding this to install-dependencies.sh
on line 12:
# temporary workaround for the dependency between gui and extension
pushd extensions/vscode
npm link @continuedev/core
popd
It should be added right after this section (before the gui section):
echo "Installing Core extension dependencies..."
pushd core
npm install
npm link
popd
I tried to add code in install-dependencies.ps1 like this:
Write-Host "`nInstalling Core extension dependencies..." -ForegroundColor White Push-Location core npm install npm link Pop-Location
// add this section Push-Location extensions/vscode npm link @continuedev/core Pop-Location // add this section
Write-Output "`nInstalling GUI extension dependencies..." -ForegroundColor White Push-Location gui npm install npm link @continuedev/core npm run build Pop-Location
But build still failed, may be should modify other code?
Before submitting your bug report
Relevant environment info
Description
I cannot to build the plugin with a Dockerfile
To reproduce
I made the following Dockerfile to build the plugin:
The docker build
docker build .
fails with the following error:For the "use strict: not found" issue, I could find a workaround by adding "#!/usr/bin/env node" as suggested here:
https://stackoverflow.com/questions/34353512/node-npm-package-throw-use-strict-command-not-found-after-publish-and-install-g
Anyone can reproduce?
Log output
The docker build
docker build .
fails with the following error:For the "use strict: not found" issue, I could find a workaround by adding "#!/usr/bin/env node" as suggested here:
https://stackoverflow.com/questions/34353512/node-npm-package-throw-use-strict-command-not-found-after-publish-and-install-g
Anyone can reproduce?