Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webR fails to install packages #86

Open
JosiahParry opened this issue Dec 1, 2023 · 3 comments
Open

webR fails to install packages #86

JosiahParry opened this issue Dec 1, 2023 · 3 comments

Comments

@JosiahParry
Copy link

I've created a shinylive app using shinylive R package. When running it using either httpuv or another local webserver numerous errors abound. Here all of the R packages fail to be installed.
image

Additionally sometimes the service worker cannot be found. Are there additional npm requirements that we should handle after "exporting" the app?
image

@JosiahParry
Copy link
Author

Terribly sorry for screenshots. JavaScript is so far out of my comfort zone!

@gadenbuie
Copy link
Contributor

It's confusing, but the "preload errors" are telling you that those packages are being installed and not that they're failing to install. On https://shinylive.io/r/editor, those messages would end up in the dev console. I don't know all the details, but there's likely a technical reason why it's easiest to surface these messages via errors.

@jeroen
Copy link

jeroen commented Dec 20, 2023

As discussed: it is confusing that webR calls console.error() in the browser for R message() and warning() conditions (when there is no "virtual R console") because these are not actually errors.

Given that webr already handles non-stopping conditions internally a better way would be to display these in JavaScript by handling "message" conditions with console.log and "warning" conditions with console.warn. I think this could be done regardless on if there is also a virtual R console available which displays these messages as well.

I think also the remaining stderr output in R (even after capturing messages/warnings) should be displayed as console.log and not console.error. Very often stderr contains output from progress bars and the like so displaying these as errors is too dramatic. console.log is more appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants