react-R / reactR

React for R

Home Page:https://react-R.github.io/reactR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add/document recommended system dependencies for reactR

maxheld83 opened this issue · comments

Trying to get reactR to run on the Ubuntu 18.04 image rstudio/r-base:3.6-bionic, I needed to install the following system dependencies:

  • curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
  • sudo apt-get install -y nodejs
    (I chose the nodesource version here, because I couldn't get vanilla apt to work)
  • sudo npm install -g yarn
    (needs to be installed from npm, not apt otherwise any later yarn install won't work)

I'm not much of a node expert -- are these dependencies alright or are different versions recommended?

I think it'd be nice if these system dependencies could be:

  • tightened up (i.e. are these the right versions / package repositories?)
  • documented in DESCRIPTION
  • documented in the vignette
  • entering the necessary info to sysreqs and/or system requirements to programmatically install the system requirements.
    This way authors of htmlwidgets wouldn't even necessarily have to document sysreqs in their DESCRIPTION, because they would carry over from Imports: reactR.

All of this might make it a bit easier on users who might typically not be fluent in these ecosystems (node).

If this is of interest, I'd be happy to write up a PR as well.

I'd appreciate any feedback you might have on what proper dependencies and sources thereof might be for the different OSes.

ah strike that:

This way authors of htmlwidgets wouldn't even necessarily have to document sysreqs in their DESCRIPTION, because they would carry over from Imports: reactR

That's actually something you wouldn't want, because users of some htmlwidget-foo (as opposed to authors of it) wouldn't actually need any of these system dependencies, because the "compiled" htmlwidget-foo would ship with the downloaded and cross-compiled js assets.

But because htmlwidget-foo would still depend on reactR, using the fancy tooling of sysreqs or system requirements, these dependencies might end up being needlessly installed.

Different from some (most?) other R package system requirements yarn, node.js and npm are actually merely build-time dependencies from the point of view of some htmlwidget-foo and need not be installed at run-time.