Wrong path in `addResourcePath`

Hello,

I am getting the following error on a Shiny app:

Warning: Error in value[[3L]]: Couldn't normalize path in `addResourcePath`, 
with arguments: `prefix` = 'crosstalk-1.0.0'; 
`directoryPath` = '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/crosstalk/www'
  [No stack trace available]

The error is coming from the addResourcePath function when calling by the crosstalk package. For some reasons, it assigned wrong path (using version 3.5 instead of version 3.6). Any suggestion how can I modify the path reference?

Below is the output of the `.libPaths()' on my machine:

> .libPaths()
[1] "/Library/Frameworks/R.framework/Versions/3.6/Resources/library"

Thanks,
Rami

Are you calling addResourcePath() directly? If not, reinstalling crosstalk might fix it.

1 Like

I am not calling addResourcePath directly, I believe that plotly trigger the crosstalk as I am using the event_data function.

Ok, have you tried re-installing crosstalk on R3.6? If the CRAN version still gives you that error, I think the GitHub version should fix it remotes::install_github("rstudio/crosstalk")

Yes, I tried both reinstalling version 1.0.0 and the github version 1.0.1, but it did not work. It does work on some machine that I tested, so it is probably related to some dependencies packages installed on my machine. I was able to run it on docker container, so I probably will run it over there. Thanks for the response!

I think I found what is causing this issue... some of the plotly plots were rendered and saved on a different machine (that has different R version). It seems like the plotly object is keeping the libraries paths of the machine which the plot was made (as opposed to refrence the package directly with crosstalk::...)

For example:

p <- plotly::plot_ly(x = 1:10, y = 1:10)

p$dependencies[[3]]$src

$file
[1] "/Library/Frameworks/R.framework/Versions/3.6/Resources/library/crosstalk/www"

This mean that it is not possible to share saved plotly objects unless modifying manually the dependencies paths. I will open an issue on plotly github page.

1 Like

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