Help building Shiny standalone app using photon

Hello folks,

I am trying to build my first standalone Shiny app using Photon and have run into a dead end. Any insight and help would be much appreciated.

First some versions and environment information. I am on Mac OS 11.6.4 running R-4.1.2 and R Studio 2021.09.0 Build 351. My npm and node installations look like this:

npm version
{
npm: '8.5.2',
node: '16.14.0',
v8: '9.4.146.24-node.20',
uv: '1.43.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.18.1',
modules: '93',
nghttp2: '1.45.1',
napi: '8',
llhttp: '6.0.4',
openssl: '1.1.1m+quic',
cldr: '40.0',
icu: '70.1',
tz: '2021a3',
unicode: '14.0',
ngtcp2: '0.1.0-DEV',
nghttp3: '0.1.0-DEV'
}

I have added photon to R studio and can attempt to build my app. The directory where my app lives looks like this.

drwxr-xr-x 3 sdh595 staff 96 Mar 2 08:24 Data
drwxr-xr-x 5 sdh595 staff 160 Mar 2 08:24 GAPf_Standalone
drwxr-xr-x 5 sdh595 staff 160 Mar 2 11:57 R
lrwxr-xr-x 1 sdh595 staff 35 Mar 2 10:54 R-Portable-Mac -> electron-quick-start/R-Portable-Mac
-rwxr-xr-x 1 sdh595 staff 20895 Mar 2 08:24 app.R
drwxr-xr-x 20 sdh595 staff 640 Mar 2 10:33 electron-quick-start
-rwxr-xr-x 1 sdh595 staff 20912 Mar 2 08:24 gapf_comp.v0.2.R
drwxr-xr-x 12 sdh595 staff 384 Mar 2 11:03 photon

Note that I copied the ‘R’ directory out of the photon clone and cloned the electron-quick-start repo because I was getting an error message complaining about not finding that directory. Then I was getting an error message about not finding the R-Portable-Mac directory so I linked to the one that lives within electron-quick-start. The R directory has the following three files:

launch_photonBuild.R photon_rstudioaddin.R startFun.R

When I run photon from the RStudio tools menu, I add in the following packages:

shiny,tidyverse,magrittr,shinyWidgets,stargazer,broom,shinydashboard,ggpubr

When I build on photon, I get the following error:

photon:::photon_rstudioaddin()

Listening on http://127.0.0.1:5200
[1] "Selected directory: "
[1] "Selected directory: /Users/sdh595/Documents/APFWageApp"
Running Photon
sh: ./R: No such file or directory
Warning: Error in system: error in running command
3: shiny::runApp
2: shiny::runGadget
1: photon:::photon_rstudioaddin
Warning message:
In if (getAttribs(panels[[i]])$value %in% open) { :
the condition has length > 1 and only the first element will be used

I have no clue where to go next. Thanks so much for any direction you may be able to provide. Once I am able to build the app for MacOS, I would love to be able to build it for Windows as well. I am not able to find information on whether one could build a standalone app for Windows on a machine running MacOS.

Once again, thanks a million.

Regards,
Sumit

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.