himanshu kulkarni
himanshu kulkarni

Reputation: 13

Error in browser: The application unexpectedly exited. Diagnostic information has been dumped to JavaScript error console while using shiny-server

I'm trying to deploy a shiny web app on shiny-server. But everytime it gives the error : "The application unexpectedly exited. Diagnostic information has been dumped to JavaScript error console" The error shown in the error console is as follows: "Listening on http://127.0.0.1:58865 Error in library(htmlwidgets) : there is no package called ‘htmlwidgets’".

I have installed the package 'htmlwidgets' on my machine. Still it always shows the error. the application works file in Rstudio but it is giving this error on browser when I run it on Shiny-server. Please suggest a solution.

Thanks.

Upvotes: 1

Views: 3268

Answers (1)

Yihui Xie
Yihui Xie

Reputation: 30114

Please read http://rstudio.github.io/shiny-server/latest/#run_as In particular, please note this:

For one, the paths in which R will look for packages (.libPaths()) are often user-dependent.

One way to solve the problem is, just like how you installed shiny, you may also install htmlwidgets to system-wide library paths, e.g.

sudo su - \
  -c "R -e \"install.packages('htmlwidgets', repos='http://cran.rstudio.com/')\""

Upvotes: 1

Related Questions