Open Giackgamba opened 8 years ago
I am facing a similar issue. Though I am using R 3.0.1
Hi. I will doing sores the R code for use it, how can do it? thanks
I am experiencing an identical error output. It looks to be resulting from calling JSON.parse() on a javascript object when it expects a JSON string.
Me too does any of you guys has solved the issue?
I have the same issue. Has anyone solved this yet?
Actually I have solved the issue, the thing is not parsing from node to R, instead is about parsing the response from R to Node, if you watch in the poorly documented samples the operator %>% is used to return the info. If you don't return any thing from R but your callback in node js is expecting to return data, then it will crash in Json.Parse(d) because d is something invalid
I cant see why the %>% is doing anything other than chaining data with dplyr package. As I understand the last value is allways returned by the parser. Can you give an example of how to explicit return something from R other than the last value in R scrip?
There are several reasons for this error as you can see in the error message it comes from the line:
app\node_modules\r-script\index.js:34:25
If you check the source code for r-script library, this error is happening in the callback when it tries to parse the result of the child process to a JSON format.
You can try to edit the index,js file in the r-script library in order to find the real problem.
I was able to fix, three diffrent errors causing this generic message:
1) No permission for the R libraries: When you are trying to run needs, or install.package in an R script you need to specify a lib folder if not R will use the default folder for packages and libraries, that folder needs to have write permissions in order to work properly
2) Missed packages, not all the packages are installed
3) Needs problem: Well i've change needs('package') to library('package') in my R file that solved my problem, my environment does not need to be portable so it can use library with no problem
Its still a problem for me. Even if I run a empty R file I will get this problem. Or just an R file with TRUE.
It works fine when I run the node file directly from console: node myfile.js. The problem happens when my r-script is inside a module.export and i later call the script from there
I gave full control permissions to the R folder and it solved the issue
Hi there, I'm loving your module, and I got it working like a charm on others machines. However I'm having problems using it on a Windows machine. It's probably a PATH issue, or R library related issue, but I can't get it work.
I'm using r-script inside a node (v4.2.4) application with the latest r-script npm release (0.0.3) and R 3.3.1
This is the relevant excerpt from my routing file: index.js
and this is the console output:
Any thought on how to solve this? What I am doing wrong?