I am having trouble getting the simplest Javascript source block in org-mode to run.
#+begin_src js console.log("Hello"); #+end_src I always get this error:
/tmp/babel-8kqQwQ/js-script-shBzKH:1 require('sys').print(require('sys').inspect(function(){ ^ TypeError: require(...).print is not a function at Object.<anonymous> (/tmp/babel-8kqQwQ/js-script-shBzKH:1:16) at Module._compile (internal/modules/cjs/loader.js:1151:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10) at Module.load (internal/modules/cjs/loader.js:1000:32) at Function.Module._load (internal/modules/cjs/loader.js:899:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) at internal/main/run_main_module.js:17:47 I am running on Spacemacs and did the configuration as described in the Org Wiki https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-js.html
OS is the latest Manjaro. Emacs 26.3
The funny thing is, I am running my Emacs on my other machine with the exact same config. Same OS, same Emacs, same .spacemacs file. No issues.
I even did a fresh install of Spacemacs with the current config template on both systems. Same result. The desktop works, the notebook doesn't.
I can only imagine that an external JS runner is missing or broken?
I really don't know how to debug this.
:results outputheader on the code block? That worked for me but I would second @wasamasa's suggestion of reporting a bug.