dmpstats / stochCRM

Graphical User Interface (GUI) developed for a stochastic avian Collision Risk Model (CRM)
7 stars 1 forks source link

Error on local start-up #26

Closed JamesMiles2 closed 2 years ago

JamesMiles2 commented 2 years ago

Hello,

I am trying to run the app locally and get the following error on start-up:

An error has occurred! shinyjs: extendShinyjs: 'functions' argument must be provided. See the documentation for '?extendShinyjs' for more details.

Any suggestions or advice would be welcomed.

May I also suggest an option to run the model deterministically within the shiny app.

Many thanks, James

grwhumphries commented 2 years ago

Hi James - What you're coming across is an issue with the latest version of shinyjs. In the latest version of shinyjs, the functions need to be explicitly provided. However, the sCRM tool was developed in an older version of R and thus the package requirements are different. The sCRM is currently being re-built for new package versions.

For a workaround for now, if you open up the UI.r script and go to line ~401, you'll see: extendShinyjs(text = jsCode)

Replace that with: extendShinyjs(text= jsCode,functions=c("backgroundCol","getParams"))

Where backgroundCol and getParams are custom javascript functions found on line ~145 of global.R

JamesMiles2 commented 2 years ago

Hi Grant,

Many thanks - all seems to be working now.

It worked when the "getParams" argument was removed.

extendShinyjs(text= jsCode,functions=c("backgroundCol"))