emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ob-js uses deprecated Node APIs


From: Matthew Lundin
Subject: Re: ob-js uses deprecated Node APIs
Date: Wed, 20 May 2020 15:05:36 -0500

Ivan Sokolov <address@hidden> writes:

> I ran into problems with ob-js. When resolving them, I found that require 
> ('sys') is deprecated, there is a patch.
>
> diff --git a/lisp/ob-js.el b/lisp/ob-js.el
> index 7592040ab..d459e8069 100644
> --- a/lisp/ob-js.el
> +++ b/lisp/ob-js.el
> @@ -65,7 +65,7 @@
>    :safe #'stringp)
>  
>  (defvar org-babel-js-function-wrapper
> -  "require('sys').print(require('sys').inspect(function(){\n%s\n}()));"
> +  
> "require('process').stdout.write(require('util').inspect(function(){%s}()));"
>    "Javascript code to print value of body.")
>  
>  (defun org-babel-execute:js (body params)

I can confirm that I just encountered this bug today and that Ivan's
patch resolves the issue.

See here for more information:

https://nodejs.org/api/deprecations.html#deprecations_dep0025_require_sys

Best,
Matt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]