r-script icon indicating copy to clipboard operation
r-script copied to clipboard

both examples (sync and async) doesn't run

Open foulong opened this issue 4 years ago • 2 comments

Hello,

ex-sync.R : the console.log command returns "null". It isn't the expected result (cf. README.md)

ex-async.R : in console, returns :

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: spawn Rscript ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)

It isn't the expected result (cf. README.md)

What solution do i have ? Is the project still maintained ?

Thanks in advance.

foulong avatar Jan 13 '21 10:01 foulong

I had the same issue using windows. After digging and understand the code, I notice that the error shows that Rscript is not recognize as a command. So check if your path is set up to use R.

Add R binaries to my path solve the issue to me.

esvanegas avatar May 24 '21 18:05 esvanegas

@esvanegas could you explain further what the R binaries folder path is? I added both C:\Program Files\R\R-4.3.1\bin\x64 C:\Program Files\R\R-4.3.1\bin

to my Path. I'm able to run R in the command prompt. Still when I test Synchronous example code. I got NULL.

ttran293 avatar Sep 19 '23 03:09 ttran293