Planeshifter / node-Rstats

[UNMAINTAINED] An interface for node.js to statistical programming language R based on the fabulous Rcpp package
GNU General Public License v2.0
58 stars 16 forks source link

problems installing #16

Open abiank opened 8 years ago

abiank commented 8 years ago

Hello, I get the following error when trying npm install rstats -- please note that RInside is indeed installed. Is it the node / node-gyp version mismatch?

Error in loadNamespace(name) : there is no package called 'RInside' Calls: ::: ... tryCatch -> tryCatchList -> tryCatchOne -> Execution halted gyp: Call to 'echo "RInside:::LdFlags()" | /usr/lib/R/bin/R --vanilla --slave' returned exit status 1. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12) gyp ERR! System Linux 4.1.7-v7+ gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/pi/r/node_modules/rstats gyp ERR! node -v v0.10.29 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok

npm ERR! rstats@0.3.1 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the rstats@0.3.1 install script. npm ERR! This is most likely a problem with the rstats package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls rstats npm ERR! There is likely additional logging output above. npm ERR! System Linux 4.1.7-v7+ npm ERR! command "/root/.nvm/v0.10.40/bin/node" "/root/.nvm/v0.10.40/bin/npm" "install" "rstats" npm ERR! cwd /home/pi/r npm ERR! node -v v0.10.40 npm ERR! npm -v 1.4.28 npm ERR! code ELIFECYCLE npm ERR! not ok code 0

petegordon commented 8 years ago

First thing I would try is a different nodejs version (like v0.12.12). You can also use npm install n, nvm, n2 or something (to switch between versions as necessary, https://www.npmjs.com/package/n).

Which gets me to my question, I think I have seen consistently that v4 and v5 is not supported by rstats (feel free to correct me if I'm wrong). Anyone have any comments on that? I may try to dig deeper into supporting v5 soon. Thanks!

chrislarsenqlik commented 8 years ago

Hi, I would also like to see current node.js compatibility on this, downgrading is unfortunately not an option.

philcontrolf1 commented 8 years ago

This looks like a duplicate of issue #14 to me - I've commented there about the current status.

Planeshifter commented 8 years ago

Dear all, sorry about the current status of this project. Due to my other commitments, I didn't find the time to update the package to support current node versions. There is a fork by ijsf which is supposed to work with more recent versions of node: https://github.com/ijsf/node-Rstats/tree/0918c18a9b6a865aced557ce2d9c1d26ea155126

philcontrolf1 commented 8 years ago

@Planeshifter: no need for apologies. We all know that real life takes priority.

Apologies if this is a dumb question; I'm not a node programmer :-) Is there an easy way to get that fork installed via npm or similar?

chrislarsenqlik commented 8 years ago

Awesome, thanks for the heads up, @philcontrolf1!

Planeshifter commented 8 years ago

You should be able to install directly from GitHub via npm:

npm install https://github.com/ijsf/node-Rstats.git
petegordon commented 8 years ago

Hi everyone! I am so very close to having it fully working with the latest versions of NodeJS. In fact it does work; but there seems to be a last problem with running cat or print causing a segmentation fault; but other calls work fine even writeFiles. You can install the npm module from github; and it will automatically clone and build RInside using npm package.json preinstall as a new package called RInsideNodeJS; from this repo fork... https://github.com/ColumbusCollaboratory/rinside) because the RINSIDE_CALLBACKS flag needed to be defined for NAN to work apparently. Try it by simply running this...

npm install https://github.com/ColumbusCollaboratory/node-Rstats

I'll pick up working on it next week; to try to find the segmentation fault problem which is apparently output stream related (anything that uses standard out in R--maybe the problem area). (fyi; I also changed it to use JSONLITE instead of RJSON).

Best!

stla commented 8 years ago

Thank you @petegordon. I got this problem but it works with npm install https://github.com/ColumbusCollaboratory/node-Rstats.

achakhalyan commented 7 years ago

Hi I also have installation problem and I use npm install https://github.com/ColumbusCollaboratory/node-Rstats command getting following error. `* installing to library '/usr/local/lib/R/site-library' ERROR: dependency 'Rcpp' is not available for package 'RInsideNodeJS'

mzager commented 7 years ago

@petegordon I am curious if you ever resolved the Segmentation fault issue. I really appreciate your work on this!