Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error /home/theia/node_modules/vscode-ripgrep: Command failed. #7384

Closed
schumischumi opened this issue Mar 20, 2020 · 4 comments
Closed

error /home/theia/node_modules/vscode-ripgrep: Command failed. #7384

schumischumi opened this issue Mar 20, 2020 · 4 comments
Labels
question user / developer questions

Comments

@schumischumi
Copy link

Description

I try to install theia with python plugins behind a proxy (incl. ssl interception) on top of a custom docker image (ubuntu xenial).
the proxy is passed via --build-args to the ENVs HTTP_PROXY and HTTPS_PROXY (both upper and lower case).
It would be easily possible to provide the package in our local repo but I dont know how to pass it to the install script
I get the error:

[4/4] Building fresh packages...
error /home/theia/node_modules/vscode-ripgrep: Command failed.
Exit code: 1
Command: node ./lib/postinstall.js
Arguments: 
Directory: /home/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 ETIMEDOUT 140.82.112.5:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
Emitted 'error' event at:
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at TLSSocket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Reproduction Steps

My Dockerfile looks like:

...
RUN echo "Acquire::http::proxy \"${HTTPS_PROXY}\";" > /etc/apt/apt.conf.d/95proxies
RUN echo "Acquire::ftp::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf.d/95proxies
RUN echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf.d/95proxies
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -

RUN apt-get install -y build-essential nodejs=10.19.0-1nodesource1
RUN npm config set -g proxy ${HTTP_PROXY}
RUN npm config set -g https-proxy ${HTTPS_PROXY}

RUN cat /usr/local/share/ca-certificates/root-ca.crt > /tmp/root-ca.pem
RUN npm config set -g cafile /tmp/root-ca.pem --global

RUN npm install -g yarn

ARG version=next
ADD custom_next.package.json ./package.json
ARG GITHUB_TOKEN
RUN yarn config set -g cafile /tmp/root-ca.pem 
RUN yarn config set -g strict-ssl false
RUN yarn config set -g proxy ${HTTP_PROXY}
RUN yarn config set -g https-proxy ${HTTPS_PROXY}
RUN yarn config list
RUN   npm_config_cafile="/tmp/root-ca.pem" npm_config_proxy="${HTTPS_PROXY}" yarn install 
...

OS and Theia version:
ubuntu xenial, theia next
Diagnostics:
Error log is in the Description.
package.json

{
    "private": true,
    "theia": {
        "frontend": {
            "config": {
                "applicationName": "Theia Python Example",
                "preferences": {
                    "files.enableTrash": false
                }
            }
        }
    },
    "dependencies": {
        "@theia/editor-preview": "next",
        "@theia/file-search": "next",
        "@theia/getting-started": "next",
        "@theia/git": "next",
        "@theia/json": "next",
        "@theia/markers": "next",
        "@theia/messages": "next",
        "@theia/monaco": "next",
        "@theia/navigator": "next",
        "@theia/outline-view": "next",
        "@theia/plugin-ext-vscode": "next",
        "@theia/preferences": "next",
        "@theia/preview": "next",
        "@theia/search-in-workspace": "next",
        "@theia/terminal": "next"
    },
    "resolutions": {
        "vscode-languageserver-protocol": "3.15.0-next.9",
        "vscode-languageserver-types": "3.15.0-next.5",
        "**/vscode-json-languageserver/**/vscode-languageserver": "6.0.0-next.1"
    },
    "devDependencies": {
        "@theia/cli": "next"
    },
    "theiaPluginsDir": "plugins",
    "theiaPlugins": {
        "vscode-builtin-bat": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/bat-1.39.1-prel.vsix",
        "vscode-builtin-clojure": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/clojure-1.39.1-prel.vsix",
        "vscode-builtin-coffeescript": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/coffeescript-1.39.1-prel.vsix",
        "vscode-builtin-configuration-editing": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/configuration-editing-1.39.1-prel.vsix",
        "vscode-builtin-cpp": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/cpp-1.39.1-prel.vsix",
        "vscode-builtin-csharp": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/csharp-1.39.1-prel.vsix",
        "vscode-builtin-css": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/css-1.39.1-prel.vsix",
        "vscode-builtin-debug-auto-launch": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/debug-auto-launch-1.39.1-prel.vsix",
        "vscode-builtin-docker": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/docker-1.39.1-prel.vsix",
        "vscode-builtin-emmet": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/emmet-1.39.1-prel.vsix",
        "vscode-builtin-fsharp": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/fsharp-1.39.1-prel.vsix",
        "vscode-builtin-go": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/go-1.39.1-prel.vsix",
        "vscode-builtin-groovy": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/groovy-1.39.1-prel.vsix",
        "vscode-builtin-grunt": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/grunt-1.39.1-prel.vsix",
        "vscode-builtin-gulp": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/gulp-1.39.1-prel.vsix",
        "vscode-builtin-handlebars": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/handlebars-1.39.1-prel.vsix",
        "vscode-builtin-hlsl": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/hlsl-1.39.1-prel.vsix",
        "vscode-builtin-html": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/html-1.39.1-prel.vsix",
        "vscode-builtin-ini": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/ini-1.39.1-prel.vsix",
        "vscode-builtin-jake": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/jake-1.39.1-prel.vsix",
        "vscode-builtin-java": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/java-1.39.1-prel.vsix",
        "vscode-builtin-javascript": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/javascript-1.39.1-prel.vsix",
        "vscode-builtin-json": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/json-1.39.1-prel.vsix",
        "vscode-builtin-less": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/less-1.39.1-prel.vsix",
        "vscode-builtin-log": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/log-1.39.1-prel.vsix",
        "vscode-builtin-lua": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/lua-1.39.1-prel.vsix",
        "vscode-builtin-make": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/make-1.39.1-prel.vsix",
        "vscode-builtin-markdown": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/markdown-1.39.1-prel.vsix",
        "vscode-builtin-merge-conflicts": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/merge-conflict-1.39.1-prel.vsix",
        "vscode-builtin-npm": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/npm-1.39.1-prel.vsix",
        "vscode-builtin-node-debug": "http://local-repo.domain.org/path/theia/plugins/next/v1.35.3/node-debug-1.35.3.vsix",
        "vscode-builtin-node-debug2": "http://local-repo.domain.org/path/theia/plugins/next/v1.33.0/node-debug2-1.33.0.vsix",
        "vscode-builtin-objective-c": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/objective-c-1.39.1-prel.vsix",
        "vscode-builtin-perl": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/perl-1.39.1-prel.vsix",
        "vscode-builtin-powershell": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/powershell-1.39.1-prel.vsix",
        "vscode-builtin-pug": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/pug-1.39.1-prel.vsix",
        "vscode-builtin-python": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/python-1.39.1-prel.vsix",
        "vscode-builtin-r": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/r-1.39.1-prel.vsix",
        "vscode-builtin-razor": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/razor-1.39.1-prel.vsix",
        "vscode-builtin-ruby": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/ruby-1.39.1-prel.vsix",
        "vscode-builtin-rust": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/rust-1.39.1-prel.vsix",
        "vscode-builtin-scss": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/scss-1.39.1-prel.vsix",
        "vscode-builtin-shaderlab": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/shaderlab-1.39.1-prel.vsix",
        "vscode-builtin-shellscript": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/shellscript-1.39.1-prel.vsix",
        "vscode-builtin-sql": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/sql-1.39.1-prel.vsix",
        "vscode-builtin-swift": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/swift-1.39.1-prel.vsix",
        "vscode-builtin-theme-abyss": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/theme-abyss-1.39.1-prel.vsix",
        "vscode-builtin-theme-defaults": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/theme-defaults-1.39.1-prel.vsix",
        "vscode-builtin-theme-kimbie-dark": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/theme-kimbie-dark-1.39.1-prel.vsix",
        "vscode-builtin-theme-monokai": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/theme-monokai-1.39.1-prel.vsix",
        "vscode-builtin-theme-dimmed": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/theme-monokai-dimmed-1.39.1-prel.vsix",
        "vscode-builtin-theme-quietlight": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/theme-quietlight-1.39.1-prel.vsix",
        "vscode-builtin-theme-red": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/theme-red-1.39.1-prel.vsix",
        "vscode-builtin-theme-solarized-dark": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/theme-solarized-dark-1.39.1-prel.vsix",
        "vscode-builtin-theme-tomorrow-night-blue": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/theme-tomorrow-night-blue-1.39.1-prel.vsix",
        "vscode-builtin-typescript": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/typescript-1.39.1-prel.vsix",
        "vscode-builtin-typescript-language-features": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/typescript-language-features-1.39.1-prel.vsix",
        "vscode-builtin-vb": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/vb-1.39.1-prel.vsix",
        "vscode-builtin-icon-theme-seti": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/vscode-theme-seti-1.39.1-prel.vsix",
        "vscode-builtin-xml": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/xml-1.39.1-prel.vsix",
        "vscode-builtin-yaml": "http://local-repo.domain.org/path/theia/plugins/next/v1.39.1-prel/yaml-1.39.1-prel.vsix",
        "vscode-editorconfig": "http://local-repo.domain.org/path/theia/plugins/next/v0.14.4/EditorConfig-0.14.4.vsix",
        "vscode-python": "http://local-repo.domain.org/path/theia/plugins/next/ms-python-release.vsix"
    }
}

yarn config v1.22.4
info yarn config
{ 'version-tag-prefix':
   'v',
  'version-git-tag':
   true,
  'version-commit-hooks':
   true,
  'version-git-sign':
   false,
  'version-git-message':
   'v%s',
  'init-version':
   '1.0.0',
  'init-license':
   'MIT',
  'save-prefix':
   '^',
  'bin-links':
   true,
  'ignore-scripts':
   false,
  'ignore-optional':
   false,
  registry:
   'https://registry.yarnpkg.com',
  'strict-ssl':
   true,
  'user-agent':
   'yarn/1.22.4 npm/? node/v10.19.0 linux x64',
  '/tmp/root-rsa.pem':
   true,
  false:
   true,
  'http://myuser:mypassword@proxy.domain.org:8080':
   true }
info npm config
{ proxy:
   'http://myuser:mypassword@proxy.domain.org:8080/',
  'https-proxy':
   'http://myuser:mypassword@proxy.domain.org:8080/',
  cafile:
   '/tmp/root-ca.pem' }

thx

@vince-fugnitto vince-fugnitto added docker issues related to docker question user / developer questions labels Mar 20, 2020
@akosyakov
Copy link
Member

I think it is an issue for vscode-rigrep: microsoft/vscode-ripgrep#5

Not sure what we can do about it in Theia.

@akosyakov akosyakov removed the docker issues related to docker label Mar 20, 2020
@schumischumi
Copy link
Author

schumischumi commented Mar 23, 2020

thx for your reply.
It seams the fix (dependency to https-proxy-agent) isnt pushed because

After having a better look at this (and remembering the issue I faced weeks ago), it is indeed normal for this dependency to be into dev deps, because vscode-ripgrep is not used in production but on postinstall stage only (hence the only “postinstall” script available).

source: microsoft/vscode-ripgrep#10
so is it a postinstall error?

never the less:
Can I install this dependency somehow myself? Or can I change the path where the ripgrep package tries to download the source?

@EmmanuelGrandin
Copy link

Hi, I replied into the original issue thread

microsoft/vscode-ripgrep#10 (comment)

Emmanuel

@schumischumi
Copy link
Author

great thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question user / developer questions
Projects
None yet
Development

No branches or pull requests

4 participants