I have added the following code to my init file. But I still get the error.
(org-babel-do-load-languages
'org-babel-load-languages
'((js . t)))
I noticed in Babel supported Languages, it says javascript requires node.js. So I download node.js and added the folder to my Environment PATH. However, I got the same error.
So how could I run javascript in org-babel?
I have added the following code to my init file. But I still get the error.
(org-babel-do-load-languages
'org-babel-load-languages
'((js . t)))
I noticed in Babel supported Languages, it says javascript requires node.js. So I download node.js and added the folder to my Environment PATH. However, I got the same error.
So how could I run javascript in org-babel?
Share Improve this question asked Nov 16, 2018 at 5:59 YnjxsjmhYnjxsjmh 30.1k7 gold badges42 silver badges62 bronze badges 1- have a look at emacs.stackexchange./a/20846/17548 – manandearth Commented Nov 16, 2018 at 17:35
1 Answer
Reset to default 9Thanks for @manandearth's link, I partly sovle this question:
Reason why I got the prompt is that I wrote the wrong src block identifier in my case.
Since I write (js . t)
, so it should like
#+BEGIN_SRC js
console.log("hello world");
#+END_SRC
Not
#+BEGIN_SRC javascript
console.log("hello world");
#+END_SRC
Possible identifiers can be found at https://orgmode/org.html#Languages and https://orgmode/worg/org-contrib/babel/languages.html.