common-workflow-language / common-workflow-language/cwltool
cwl_utils.errors.JavascriptException: NodeJSEngine requires Node.js engine to evaluate and validate Javascript expressions, but couldn't find it.
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
Hi Team
I am trying to check if the pipeline is free from errors and I ran the validate command from the folder where the.cwl file is. I am getting java error as mentioned below. Has it to do with the version of the cwl? Could you please help me out?
## Workflow Code
```
cwltool --validate --debug atac-seq-noumi-pe.cwl
```
## Full Traceback
(base) katarij1@C02F602BMD6W atac_seq % cwltool --validate --debug atac-seq-noumi-pe.cwl
INFO /opt/anaconda3/bin/cwltool 3.1.20221115160822
INFO Resolved 'atac-seq-noumi-pe.cwl' to 'file:///Users/katarij1/Projects/Gaurav/ATAC/CWL_scripts-master/workflows/atac_seq/atac-seq-noumi-pe.cwl'
ERROR I'm sorry, I couldn't load this CWL file.
The error was:
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/main.py", line 1158, in main
tool = make_tool(uri, loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/load_tool.py", line 619, in make_tool
tool = loadingContext.construct_tool_object(processobj, loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/workflow.py", line 54, in default_make_tool
return Workflow(toolpath_object, loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/workflow.py", line 108, in __init__
self.make_workflow_step(
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/workflow.py", line 155, in make_workflow_step
return WorkflowStep(toolpath_object, pos, loadingContext, parentworkflowProv)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/workflow.py", line 250, in __init__
self.embedded_tool = load_tool(toolpath_object["run"], loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/load_tool.py", line 641, in load_tool
return make_tool(uri, loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/load_tool.py", line 619, in make_tool
tool = loadingContext.construct_tool_object(processobj, loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/workflow.py", line 54, in default_make_tool
return Workflow(toolpath_object, loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/workflow.py", line 108, in __init__
self.make_workflow_step(
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/workflow.py", line 155, in make_workflow_step
return WorkflowStep(toolpath_object, pos, loadingContext, parentworkflowProv)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/workflow.py", line 250, in __init__
self.embedded_tool = load_tool(toolpath_object["run"], loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/load_tool.py", line 641, in load_tool
return make_tool(uri, loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/load_tool.py", line 619, in make_tool
tool = loadingContext.construct_tool_object(processobj, loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/workflow.py", line 50, in default_make_tool
return command_line_tool.CommandLineTool(toolpath_object, loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/command_line_tool.py", line 403, in __init__
super().__init__(toolpath_object, loadingContext)
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/process.py", line 710, in __init__
validate_js_expressions(
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/validate_js.py", line 240, in validate_js_expressions
expression_lib_line_errors, expression_lib_line_globals = jshint_js(
File "/opt/anaconda3/lib/python3.9/site-packages/cwltool/validate_js.py", line 165, in jshint_js
returncode, stdout, stderr = exec_js_process(
File "/opt/anaconda3/lib/python3.9/site-packages/cwl_utils/sandboxjs.py", line 576, in exec_js_process
return cast(Tuple[int, str, str], _exec_js_process(*args, **kwargs))
File "/opt/anaconda3/lib/python3.9/site-packages/cwl_utils/sandboxjs.py", line 196, in exec_js_process
new_proc = self.new_js_proc(
File "/opt/anaconda3/lib/python3.9/site-packages/cwl_utils/sandboxjs.py", line 396, in new_js_proc
raise JavascriptException(
cwl_utils.errors.JavascriptException: NodeJSEngine requires Node.js engine to evaluate and validate Javascript expressions, but couldn't find it. Tried nodejs, node, docker run node:slim
## Your Environment
* cwltool version:
/opt/anaconda3/bin/cwltool 3.1.20221115160822
Contributor guide
Assessment
This issue has not been assessed yet.