posit-dev / r-shinylive

https://posit-dev.github.io/r-shinylive/
Other
147 stars 15 forks source link

JavaScript console errors when running local shinylive export #83

Closed daattali closed 1 month ago

daattali commented 1 month ago

Using latest shiny 1.8.1.1 and shinylive 0.1.1, using the example from ?export:

app_dir <- system.file("examples", "01_hello", package = "shiny")
out_dir <- tempfile("shinylive-export")
export(app_dir, out_dir)
httpuv::runStaticServer(out_dir)

The JS console is full of errors:

Service Worker registered
shinylive.js:21554 Download the React DevTools for a better development experience: https://reactjs.org/link/react-devtools
shinylive.js:31930 WebR is using `PostMessage` communication channel, nested R REPLs are not available.
Xs @ shinylive.js:31930
shinylive.js:34938 preload error:wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
_error @ shinylive.js:34938
shinylive.js:34938 preload error:falling back to ArrayBuffer instantiation
_error @ shinylive.js:34938
shinylive.js:34937 preload echo:
shinylive.js:34937 preload echo:R version 4.3.0 (2023-04-21) -- "Already Tomorrow"
shinylive.js:34937 preload echo:Copyright (C) 2023 The R Foundation for Statistical Computing
shinylive.js:34937 preload echo:Platform: wasm32-unknown-emscripten (32-bit)
shinylive.js:34937 preload echo:
shinylive.js:34937 preload echo:R is free software and comes with ABSOLUTELY NO WARRANTY.
shinylive.js:34937 preload echo:You are welcome to redistribute it under certain conditions.
shinylive.js:34937 preload echo:Type 'license()' or 'licence()' for distribution details.
shinylive.js:34937 preload echo:
shinylive.js:34937 preload echo:R is a collaborative project with many contributors.
shinylive.js:34937 preload echo:Type 'contributors()' for more information and
shinylive.js:34937 preload echo:'citation()' on how to cite R or R packages in publications.
shinylive.js:34937 preload echo:
shinylive.js:34937 preload echo:Type 'demo()' for some demos, 'help()' for on-line help, or
shinylive.js:34937 preload echo:'help.start()' for an HTML browser interface to help.
shinylive.js:34937 preload echo:Type 'q()' to quit R.
shinylive.js:34937 preload echo:
shinylive.js:34938 preload error:Downloading webR package: Rcpp
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: R6
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: fastmap
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: rlang
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: later
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: magrittr
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: promises
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: httpuv
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: mime
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: jsonlite
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: xtable
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: base64enc
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: digest
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: ellipsis
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: htmltools
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: fontawesome
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: sourcetools
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: crayon
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: withr
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: commonmark
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: glue
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: cachem
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: jquerylib
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: cli
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: lifecycle
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: memoise
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: fs
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: rappdirs
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: sass
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: bslib
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: codetools
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: renv
_error @ shinylive.js:34938
shinylive.js:34938 preload error:Downloading webR package: shiny
georgestagg commented 1 month ago

Closing as a duplicate of posit-dev/shinylive#86, we'll track the issue there.

As mentioned in that thread, these are not really error messages and are related to how Shinylive is handling stderr message output from webR. It should indeed be changed, but for the moment you can safely ignore the preload error:Downloading webR package output lines.