Error building Theia behind Nexus

Hi, in my corporate environment we can’t directly connect to the outside world, we can only do so through nexus/artifactory registries/repositories. We are trying to build Theia and largely works fine (we set up nexus registries for NPM and Yarn, as well as a raw nexus proxy to download the node headers for node-gyp).

Now, it fails trying to download vscode-ripgrep, as that package tries to connect to on its own, not sure how i can change its behaviour from within the build. Now we are thinking we could try downloading ripgrep manually and save it in the folder that vscode-ripgrep would use, so that the script would skip the download.

Did anyone try this? Or have suggestions on where the bin folder should be placed with ripgrep? (if you have Theia built, would you be able to check the location for me?) Thanks a lot, it would be super useful!

Hi @apisoni,

a few weeks ago, someone asked a similar question on the Theia-GitHub-Discussion board. Your initial guess seems to be correct in that downloading it manually should skip the download script.

Regarding the second part of your question, the binary file rg has to be placed at <project-root>/node_modules/vscode-ripgrep/bin.

Thanks! It worked :slight_smile:

@msujew @apisoni Can you elaborate how you did this? I notice the root-folder/node_modules/vscode-ripgrep being fed to trick the postinstall script is getting overwritten during theia build.

@arun you resolved the discussion on GitHub a few minutes ago. Were you able to successfully built the app?

@msujew Not sure if I marked it resolved but I see that is the suggested answer. No I am still not able to build it successfully without internet.

I see from the log file that build removes the files I place in node_modules/vscode-ripgrep/*
“verbose 95.2051141 Removing extraneous file “/root/bld/input_build/node_modules/vscode-ripgrep/bin”.
verbose 95.2084514 Removing extraneous file “/root/bld/input_build/node_modules/vscode-ripgrep/bin/rg”.”

@arun none of the build tools involved in building Theia should remove extraneous files. What build tool are you using, and with which arguments?

I just tested adding an extra rg.txt file in the bin folder of ripgrep. I was able to run the installation and build process without anything removing the extraneous file.

@msujew: Thanks for checking! I am trying to build Theia v1.19.0 on Linux x86_64 with tools:
yum install devtoolset-11 //gets gcc -11, make
yum install pkgconfig
yum install libX11-devel.x86_64 libxkbfile-devel.x86_64
yum install libsecret-devel
node v12.14.1
yarn v1.22.17

I am just doing yarn install which seems to trigger theia build && theia download:plugins