Open Hummel009 opened 2 months ago
Hi @Hummel009 if I am not mistaken this does not work with python 3.12.x Try python 3.11.x. I usually build this with WSL on Windows, but I can also verify this today on Windows directly.
Hi @Hummel009 you have to install fitting spectre mitigation libraries. Like you I am using Visual Studio Community 2022, so in the installer you have to "Change" the installation and then go to "Individual components" and install the fitting libraries like you see in the screenshot below. @CGNonofr this is not a monaco-vscode-api issue, but could be mentioned in the README:
Sure! do you mind updating the README/troubleshooting? I'm not sure I understand fully the issue
@CGNonofr will do
Thanks a lot for your help! Now everything installed without any problems.
There is another problem after installation. When I am using Windows and trying to launch command «npm run build», appears new error saying, that rm not exist. And when I am using WSL, it says, that package.json is not found.
@Hummel009 building this repo from scratch is only possible on Linux and Mac. If you are using Windows consider using a WSL that's what I usually do.
@Hummel009 building this repo from scratch is only possible on Linux and Mac. If you are using Windows consider using a WSL that's what I usually do.
I think they try WSL without success, I'm not familliar at all with WSL though
Standard Ubuntu LTS, plus installing node.js and git should do
Still couldn't configure one problem with this repo; I don't think it's now related to the installation itself, more to the configuration or dependencies... Anyway, npm run build
fails due to a few errors. No edits were made to the code, the installation was successful in WSL.
The Unexpected any value in conditional
warnings are due to the eslint @typescript-eslint/strict-boolean-expressions
plugin which is at least... bugous
I don't know about the first 2 errors.
It looks like eslint is not able to take typescript types into account...
I’m still trying to install the repository, as mentioned above, only pure Ubuntu LTS 24.04 + git + node. The problem persists; The npm ci
command cannot be executed, the run build
command gives the errors that I attached in the screenshot above.
This month I tried several different Linux distributions, the problem was the same everywhere. At some point, I came across advice on the Internet for installing Yarn. After that, all the logs when installing the repository changed. However, this also did not lead to success.
Perhaps there are some special requirements? For example, a specific version of node or git. Also above were mentioned dependencies such as VS + spectre mitigation libraries and a special version of python, but as I understand it, this is not relevant outside WSL. Or relevant?
I’m still trying to install the repository, as mentioned above, only pure Ubuntu LTS 24.04 + git + node. The problem persists; The
npm ci
command cannot be executed, therun build
command gives the errors that I attached in the screenshot above.This month I tried several different Linux distributions, the problem was the same everywhere. At some point, I came across advice on the Internet for installing Yarn. After that, all the logs when installing the repository changed. However, this also did not lead to success.
Perhaps there are some special requirements? For example, a specific version of node or git. Also above were mentioned dependencies such as VS + spectre mitigation libraries and a special version of python, but as I understand it, this is not relevant outside WSL. Or relevant?
What version of Node and npm, where you try to build the repo, are you running? For version 5.x.x i had to use Node >= 18.x and npm >= 10.2.x
Another problem I encountered initially is that vscode encoded the "install-vscode" file with wrong line endings resulting in errors when building from Windows through wsl.
I am using Node 20.15.0 and NPM 10.7.0. For the version 5.3.0 of the repo.
After installation of Ubuntu LTS 24.04 + this versions of Node and npm, I used three commands from the README of this repo. Everything was OK. Then I used npm ci
, and the command ended with next error:
Installing vscode dependencies...
./scripts/install-vscode: line 36: yarn: command not found
npm error code 127
npm error path /home/hummel009/monaco
npm error command failed
npm error command sh -c patch-package && ./scripts/install-vscode
npm error A complete log of this run can be found in: /home/hummel009/.npm/_logs/2024-06-23T08_05_39_925Z-debug-0.log
I decided that I should install Yarn and I did npm install --global yarn
. Then I tried npm ci
again. Yarn was found, there were huge logs in terminal and they ended with next problem:
Unhandled Rejection at: Promise Promise {
<rejected> Error: bad export type for `tree_sitter_tsx_external_scanner_create`: undefined
at reportUndefinedSymbols (/tmp/tmp.q25qugj5OU/node_modules/web-tree-sitter/tree-sitter.js:1:19748)
at postInstantiation (/tmp/tmp.q25qugj5OU/node_modules/web-tree-sitter/tree-sitter.js:1:17027)
at /tmp/tmp.q25qugj5OU/node_modules/web-tree-sitter/tree-sitter.js:1:17752
at async /tmp/tmp.q25qugj5OU/node_modules/@vscode/l10n-dev/dist/main.js:329:10
at async /tmp/tmp.q25qugj5OU/node_modules/@vscode/l10n-dev/dist/main.js:318:22
} reason: Error: bad export type for `tree_sitter_tsx_external_scanner_create`: undefined
at reportUndefinedSymbols (/tmp/tmp.q25qugj5OU/node_modules/web-tree-sitter/tree-sitter.js:1:19748)
at postInstantiation (/tmp/tmp.q25qugj5OU/node_modules/web-tree-sitter/tree-sitter.js:1:17027)
at /tmp/tmp.q25qugj5OU/node_modules/web-tree-sitter/tree-sitter.js:1:17752
at async /tmp/tmp.q25qugj5OU/node_modules/@vscode/l10n-dev/dist/main.js:329:10
at async /tmp/tmp.q25qugj5OU/node_modules/@vscode/l10n-dev/dist/main.js:318:22
[11:30:26] The following tasks did not complete: editor-distro
[11:30:26] Did you forget to signal async completion?
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm error code 1
npm error path /home/hummel009/monaco
npm error command failed
npm error command sh -c patch-package && ./scripts/install-vscode
npm error A complete log of this run can be found in: /home/hummel009/.npm/_logs/2024-06-23T08_19_17_756Z-debug-0.log
Did you try installing Volta? we're relying on it here
@CGNonofr should "yarn" be added to the volta config? I was wondering if we should add a Dockerfile with minimum set of packages, so people could use it as a devcontainer. I could propose something...
@CGNonofr should "yarn" be added to the volta config? I was wondering if we should add a Dockerfile with minimum set of packages, so people could use it as a devcontainer. I could propose something...
Yarn is only used by the VSCode build script, so adding it in this project won't do much. It just guarantee yarn is present though
I'm open to anything making it easier to contribute :)
It just guarantee yarn is present though
Yes, that was the intention 🙂
I was able to really get a lot further with Volta, thanks for the advice! It's a pity that the repository doesn't have a step-by-step set of commands for pure Linux to get started. It's not always possible to guess.
So far the npm ci
and npm run build
commands have worked well, I can say. Some logs wrote errors in the process, but the resulting one said success.
But the npm start
command in the demo has some errors in the process. Trying to open the editor in a browser causes the application to terminate with an error.
What are the error in the build? because not a single one is expected
npm install vscode@npm:@codingame/monaco-vscode-api
— deprecated warnings, vulnerabilities
npm install monaco-editor@npm:@codingame/monaco-vscode-editor-api
— deprecated warnings, vulnerabilities
npm install -D @types/vscode
— deprecated warnings, vulnerabilities
npm ci
— a few «peer dependency» warnings, GYP errors, kerberos errors.
The process is lengthy, this is only part of it. I'll be recording and screenshoting more, and then publish here.
Ok those are in the VSCode project build process, I confirm there are a few warnings
Did you try removing the vite cache in the demo by removing node_modules/.vite? (or running npm ci
)
Does the file pretended to be not existing exists on the disk?
Folder .vite in node modules of demo subfolder doesn't exist, I can't remove it.
Kerberos.o really doesnt't exist, as said in the log. But kerberos folders with kerberos headers exist. Perhaps some special version of make, cmake & gcc is needed?
I'm not sure, maybe the better is to refer to the VSCode build documentation directly
Installing kerberos as a separate package helped get rid of this error. Now there is only one red error left, and it has something to do with git. Git is installed and I am authorized in it. Can you tell me what could be the problem?
In addition, there are a large number of references to unknown files and omissions in the log. I don't know if this is fatal, or if you also have this on installation.
Basically, I don't see anything else that seems serious. There are some suspicious logs, which I photographed just in case, I think I showed some of them last time, but everything else is normal.
If you wanna compare with the expected build log, you can compare with https://github.com/CodinGame/monaco-vscode-api/actions/runs/9599453082/job/26473217503 (Install dependencies section)
In addition to examining the logs, I also decided to reiterate the sequence of commands that your action executes. The first difference starts here:
Your log
patching file yarn.lock
patch -p1 -i /home/runner/work/monaco-vscode-api/monaco-vscode-api/vscode-paches/0059-fix-backport-fix.patch
patching file src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts
Installing vscode dependencies...
yarn config v1.22.22
success Set "ignore-engines" to true.
Done in 0.04s.
yarn install v1.22.22
My log
patching file yarn.lock
patch -p1 -i /home/hummel009/Desktop/monaco-vscode-api/vscode-paches/0059-fix-backport-fix.patch
patching file src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts
Installing vscode dependencies...
Volta error: Node is not available.
To run any Node command, first set a default version using `volta install node`
Error details written to /home/hummel009/.volta/log/volta-error-2024-06-27_15_47_36.318.log
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
npm notice To update run: npm install -g npm@10.8.1
npm notice
npm error code 126
npm error path /home/hummel009/Desktop/monaco-vscode-api
npm error command failed
npm error command sh -c patch-package && ./scripts/install-vscode
npm error A complete log of this run can be found in: /home/hummel009/.npm/_logs/2024-06-27T12_45_57_116Z-debug-0.log
Earlier this problem didn't appear because I had NPM installed before Volta. Perhaps clashing different installers is not good, but, one way or another, for some reason Volta does not work correctly for me if NPM was not installed before.
P.S. I set default version using volta install node
, as log said. Nothing changed.
When I pre-install NPM + Yarn and then only install Volta on the system, all the logs are exactly the same as in the online build of this repository. However, npm start
in demo still does not work. It is missing 4 files (last time it was missing 7), and they are not visible in the imports. As a result, when I open the browser at a given address and port, instead of the demo just a blank screen with a title.
I tried to follow the instructions in readme to install monaco-vscode-api, but there were a few errors:
Now there is still error, but I can't understand, what's wrong.
P.S. I have installed node.js, so commands like npm and gyp work well. And I should also say, that my colleagues have same problem with monaco-vscode-api installation too.
Here is screenshot of errored console.