r-wasm / webr

The statistical language R compiled to WebAssembly via Emscripten, for use in web browsers and Node.
https://docs.r-wasm.org/webr/latest/
Other
805 stars 54 forks source link

Cannot install the 'devtools' package #376

Closed MaybeJustJames closed 4 months ago

MaybeJustJames commented 4 months ago

This can be reproduced on the interactive demo page (https://docs.r-wasm.org/webr/latest/) with this snippet:

webr::install('devtools')
library(devtools)

Which results in this error:

Error: package or namespace load failed for ‘devtools’:
 .onLoad failed in loadNamespace() for 'pkgload', details:
  call: NULL
  error: evaluation nested too deeply: infinite recursion / options(expressions=)?
georgestagg commented 4 months ago

This is the same issue as #374, so I will close this as a duplicate in favour of that thread. See the discussion there for further details, but the package should load in non-Safari browsers with:

options(expressions = 5000)
webr::install('devtools')
library(devtools)

Note that curl is not available in webR, so loading and trying to use devtools will generate unrelated errors about curl. Also note that an R development toolchain does not exist in webR itself, so much of devtools functionality will be unavailable.