Skip to content

cli: print a nice error message if nodejs is missing instead of 'Ahhhhhhh! you found a bug' #1983

@schymans

Description

@schymans

Describe the bug

A clear and concise description.

Details

The error occurred on my local renku installation. Here is the terminal output:

$ renku update --all --with-siblings
Resolved '../../../../../../../tmp/tmp89wsuoq0/7931aa6b-d0e1-4ac2-8dec-76096b2592f9.cwl' to 'file:///tmp/tmp89wsuoq0/7931aa6b-d0e1-4ac2-8dec-76096b2592f9.cwl'
INFO:cwltool:Resolved '../../../../../../../tmp/tmp89wsuoq0/7931aa6b-d0e1-4ac2-8dec-76096b2592f9.cwl' to 'file:///tmp/tmp89wsuoq0/7931aa6b-d0e1-4ac2-8dec-76096b2592f9.cwl'
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/images/json?filters=%7B%22reference%22%3A%7B%22node%3Aslim%22%3Atrue%7D%7D: dial unix /var/run/docker.sock: connect: permission denied
Ahhhhhhhh! You have found a bug. 🐞

The related project on renkulab.io: https://renkulab.io/projects/ba_math_gen-16/et-data

Renku version: 0.14.0
OS: Linux (#1 SMP Progress Linux 5.9.9-1~progress5+u1 (2020-11-19))
Python: 3.7.9

Traceback

Traceback (most recent call last):
  File "[...]/site-packages/cwltool/process.py", line 709, in __init__
    validate_js_options,
  File "[...]/site-packages/cwltool/validate_js.py", line 251, in validate_js_expressions
    code_fragment_js, js_globals, jshint_options
  File "[...]/site-packages/cwltool/validate_js.py", line 157, in jshint_js
    context=jshint_functions_text,
  File "[...]/site-packages/cwltool/sandboxjs.py", line 189, in exec_js_process
    new_proc = new_js_proc(js_engine_code, force_docker_pull=force_docker_pull)
  File "[...]/site-packages/cwltool/sandboxjs.py", line 134, in new_js_proc
    "docker run node:slim".format(", ".join(trynodes))
cwltool.sandboxjs.JavascriptException: cwltool requires Node.js engine to evaluate and validate Javascript expressions, but couldn't find it.  Tried nodejs, node, docker run node:slim

Additional context

Add any other context about the problem.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions