diff --git a/rstan/rstan/R/zzz.R b/rstan/rstan/R/zzz.R index de088444f..3f648c594 100644 --- a/rstan/rstan/R/zzz.R +++ b/rstan/rstan/R/zzz.R @@ -24,7 +24,7 @@ OUT <- 0 assign("stanc_ctx", V8::v8(), envir = topenv()) } else assign("stanc_ctx", QuickJSR::JSContext$new(stack_size = 4 * 1024 * 1024), envir = topenv()) stanc_js <- system.file("stanc.js", package = "StanHeaders", mustWork = TRUE) - if (!stanc_ctx$validate(stanc_js)) { + if (!file.exists(stanc_js)) { stanc_js <- system.file("exec", "stanc.js", package = "rstan", mustWork = TRUE) } stanc_ctx$source(stanc_js)