Trying to build Theia

I am new to Theia and try to start it according to the instructions given in Developing,md in the doc Directory. My Problem is that I constantly get an error when one of the postinstall scripts is run:

[4/5] Linking dependencies…
warning " > istanbul-instrumenter-loader@3.0.1" has unmet peer dependency “webpack@^2.0.0 || ^3.0.0 || ^4.0.0”.
warning " > tslint-language-service@0.9.9" has incorrect peer dependency “typescript@>= 2.3.1 < 3”.
warning “workspace-aggregator-ffa455e8-5ca7-4241-a7af-ea5c37596069 > @theia/application-manager > font-awesome-webpack@0.0.5-beta.2” has unmet peer dependency “font-awesome@>=4.3.0”.
warning “workspace-aggregator-ffa455e8-5ca7-4241-a7af-ea5c37596069 > @theia/debug > requestretry@3.1.0” has unmet peer dependency “request@2..”.
warning “workspace-aggregator-ffa455e8-5ca7-4241-a7af-ea5c37596069 > @theia/messages > react-perfect-scrollbar@1.5.3” has unmet peer dependency “react@>=16.3.3”.
warning “workspace-aggregator-ffa455e8-5ca7-4241-a7af-ea5c37596069 > @theia/messages > react-perfect-scrollbar@1.5.3” has unmet peer dependency “react-dom@>=16.3.3”.
warning “workspace-aggregator-ffa455e8-5ca7-4241-a7af-ea5c37596069 > @theia/scm > react-autosize-textarea@7.0.0” has unmet peer dependency “react@^0.14.0 || ^15.0.0 || ^16.0.0”.
warning “workspace-aggregator-ffa455e8-5ca7-4241-a7af-ea5c37596069 > @theia/scm > react-autosize-textarea@7.0.0” has unmet peer dependency “react-dom@^0.14.0 || ^15.0.0 || ^16.0.0”.
warning “workspace-aggregator-ffa455e8-5ca7-4241-a7af-ea5c37596069 > @theia/application-manager > font-awesome-webpack > less-loader@2.2.3” has incorrect peer dependency “less@^2.3.1”.
warning Workspaces can only be enabled in private projects.
[5/5] Building fresh packages…
[11/16] ⠂ vscode-ripgrep
[-/16] ⠂ waiting…
[-/16] ⠂ waiting…
[10/16] ⠄ oniguruma
error /home/laj/SRC/theia/node_modules/vscode-ripgrep: Command failed.
Exit code: 1
Command: node ./lib/postinstall.js
Arguments:
Directory: /home/laj/
SRC/theia/node_modules/vscode-ripgrep
Output:
Finding release for v11.0.1-2
GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v11.0.1-2
events.js:174
throw er; // Unhandled ‘error’ event
^

Error: connect ECONNREFUSED 140.82.118.5:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
Emitted ‘error’ event at:
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:198:13)

However, the proxy of my virtual machine is set correctly and i can access the requested site using a web browser. Any help is appreciated…

Lars

[original thread by califax2k]

Hi @lars-jordan, you can take a look at someone who has encountered the same problems previously: https://github.com/eclipse-theia/theia/issues/3157

[califax2k]

@vince-fugnitto thanks for pointing me to the previous issues. Maybe I should have been a bit more specific. In my VM I am running Ubuntu 18.04 not Windows. However, I didn’t have a GITHUB_TOKEN yet, so I created it and placed it in the according env variable. I guess I don’t need to install the windows build tools npm package there…

[califax2k]

Found the following: https://github.com/microsoft/vscode-ripgrep/issues/5 - doesn’t seem to be a Theia problem…

@lars-jordan thank you for your response and for pointing out the vscode-ripgrep issue. For my own information, have you seen and installed the prerequisties: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites

Hi @lars-jordan I think you’re right - this looks to be an issue with ripgrep itself, that we cannot do much to alleviate in Theia. If you’re just playing around and not doing anything too secret, you could open the Theia repo using Gitpod (https://www.gitpod.io/), and be able to experiment from there.

note: Gitpod is an online development environment based on Theia, so you’d be using a Theia-based app as well to develop. The creators of Gitpod are also Theia committers, and interact on this Spectrum channel

Direct link to open latest Theia master in Gitpod (GitHub credentials work for Gitpod): https://gitpod.io/#https://github.com/eclipse-theia/theia

[califax2k]

@vince-fugnitto I am using node 10.17.0, yarn 1.19.1, git 2.17.1 and python 2.7.15+. make, gcc and pkg-config are installed. If version 1.7.0 of yarn is an absolute requirement then I am not fulfilling it. If it’s a minimum requirement then I do. (maybe in that case it should be pointed out as such in the docs)

Everything looks fine, I was just curious as to troubleshoot the problem :slight_smile: The bug looks to be correctly identified as an issue with vscode-ripgrep itself as you mentioned.

[califax2k]

it was mentioned in https://spectrum.chat/theia/dev/error-building-theia-full-behind-an-enterprise-proxy~74cd52da-50b3-4ca1-8d04-7965408865a8https://spectrum.chat/theia/dev/error-building-theiafull-behind-an-enterprise-proxy~74cd52da-50b3-4ca1-8d04-7965408865a8 by @anton-kosyakov

[califax2k]

Hey guys, what’s the recommended way to get Theia to work anyway when dependencies haven’t been downloaded yet. MS doesnt seem to move very fast :frowning:

I do not see a generic way to fix this type of thing. For ripgrep, there is a caching mechanism in the script that downloads the executable, so it’s not fetched every time. If you can create the cache directory before building and populate it with the version of ripgrep that would be downloaded, it looks like the download would be skipped. see: https://github.com/microsoft/vscode-ripgrep/blob/master/lib/download.js#L13

On my Ubuntu machine, the cache directory is e.g.: /tmp/vscode-ripgrep-cache-1.2.5 and contains ripgrep-0.10.0-pcre-linux-x64.zip .

[califax2k]

@marc-dumais thx, I’ll try that. Meanwhile a colleague had another idea. He looked at the yarn.lock file of a previous theia version and found that ripgrep 1.2.5 was used (as opposed to 1.5.7 now). He changed it back and now it works, too.