我刚在shinyapps.io中部署了一个Shiny
应用。
当我点击链接时,它会给我一个disconnected from the server
。
我转到应用程序日志(下方),它显示curl
错误,但应用程序在本地运行完美。该应用程序从网络上提取.json数据。
知道这可能是什么吗?
2017-07-24T00:41:20.602891+00:00 shinyapps[198984]: The following objects are masked from ‘package:stats’:
2017-07-24T00:41:20.602892+00:00 shinyapps[198984]:
2017-07-24T00:41:20.602893+00:00 shinyapps[198984]: filter, lag
2017-07-24T00:41:20.602894+00:00 shinyapps[198984]:
2017-07-24T00:41:20.603948+00:00 shinyapps[198984]: The following objects are masked from ‘package:base’:
2017-07-24T00:41:20.603950+00:00 shinyapps[198984]: intersect, setdiff, setequal, union
2017-07-24T00:41:20.603951+00:00 shinyapps[198984]:
2017-07-24T00:41:20.603949+00:00 shinyapps[198984]:
2017-07-24T00:41:20.759622+00:00 shinyapps[198984]:
2017-07-24T00:41:20.759625+00:00 shinyapps[198984]: Attaching package: ‘lubridate’
2017-07-24T00:41:20.759626+00:00 shinyapps[198984]:
2017-07-24T00:41:20.759961+00:00 shinyapps[198984]:
2017-07-24T00:41:20.769217+00:00 shinyapps[198984]:
2017-07-24T00:41:20.759961+00:00 shinyapps[198984]: date
2017-07-24T00:41:20.759962+00:00 shinyapps[198984]:
2017-07-24T00:41:20.769218+00:00 shinyapps[198984]: Attaching package: ‘chron’
2017-07-24T00:41:20.759960+00:00 shinyapps[198984]: The following object is masked from ‘package:base’:
2017-07-24T00:41:20.769218+00:00 shinyapps[198984]:
2017-07-24T00:41:20.769542+00:00 shinyapps[198984]:
2017-07-24T00:41:20.775160+00:00 shinyapps[198984]: Warning: Error in : Required package curl not found. Please run: install.packages('curl')
2017-07-24T00:41:20.769541+00:00 shinyapps[198984]: The following objects are masked from ‘package:lubridate’:
2017-07-24T00:41:20.769543+00:00 shinyapps[198984]:
2017-07-24T00:41:20.769542+00:00 shinyapps[198984]: days, hours, minutes, seconds, years
2017-07-24T00:41:20.778990+00:00 shinyapps[198984]: Stack trace (innermost first):
2017-07-24T00:41:20.778991+00:00 shinyapps[198984]: 64: base::stop
2017-07-24T00:41:20.778992+00:00 shinyapps[198984]: 62: value[[3L]]
2017-07-24T00:41:20.778991+00:00 shinyapps[198984]: 63: stop
2017-07-24T00:41:20.778992+00:00 shinyapps[198984]: 61: tryCatchOne
2017-07-24T00:41:20.778993+00:00 shinyapps[198984]: 60: tryCatchList
2017-07-24T00:41:20.778993+00:00 shinyapps[198984]: 59: tryCatch
2017-07-24T00:41:20.778994+00:00 shinyapps[198984]: 58: loadpkg
2017-07-24T00:41:20.778994+00:00 shinyapps[198984]: 57: fromJSON
2017-07-24T00:41:20.778995+00:00 shinyapps[198984]: 55: eval
2017-07-24T00:41:20.778994+00:00 shinyapps[198984]: 56: as.data.frame
2017-07-24T00:41:20.778996+00:00 shinyapps[198984]: 54: eval
2017-07-24T00:41:20.778996+00:00 shinyapps[198984]: 53: withVisible
2017-07-24T00:41:20.778997+00:00 shinyapps[198984]: 52: source
2017-07-24T00:41:20.778997+00:00 shinyapps[198984]: 13: runApp
2017-07-24T00:41:20.778998+00:00 shinyapps[198984]: 12: fn
2017-07-24T00:41:20.778998+00:00 shinyapps[198984]: 11: doTryCatch
2017-07-24T00:41:20.778998+00:00 shinyapps[198984]: 10: tryCatchOne
2017-07-24T00:41:20.778999+00:00 shinyapps[198984]: 9: tryCatchList
2017-07-24T00:41:20.778999+00:00 shinyapps[198984]: 8: tryCatch
2017-07-24T00:41:20.778999+00:00 shinyapps[198984]: 7: connect$retry
2017-07-24T00:41:20.779000+00:00 shinyapps[198984]: 6: eval
2017-07-24T00:41:20.779000+00:00 shinyapps[198984]: 5: eval
2017-07-24T00:41:20.779000+00:00 shinyapps[198984]: 4: eval
2017-07-24T00:41:20.779001+00:00 shinyapps[198984]: 3: eval
2017-07-24T00:41:20.779001+00:00 shinyapps[198984]: 2: eval.parent
2017-07-24T00:41:20.779001+00:00 shinyapps[198984]: 1: local
2017-07-24T00:41:20.779086+00:00 shinyapps[198984]: Error : Required package curl not found. Please run: install.packages('curl')
答案 0 :(得分:2)
通过调用curl
库然后重新部署应用程序来解决问题。
答案 1 :(得分:0)
或者,您可以在脚本中添加以下内容
options(rsconnect.http = "rcurl")