error deploying - jsonlite fails to build

Hi all,

Today I made some simple edits to a shiny app and could not deploy it anymore due to an error related to jsonlite. I tried to replace other packages where I did not make any changes but they too could not be deployed.

I am using Ubuntu 22.04.4, R version 4.4.0 (2024-04-24) -- "Puppy Cup" and Rstudio 2024.04.0 Build 735

Here is some of the output:

Error in .make_numeric_version(x, strict, .standard_regexps()$valid_numeric_version) : 
  invalid non-character version specification 'x' (type: double)
Error: unable to load R code in package ‘jsonlite’
Execution halted
* installing to library ‘/usr/lib/R’
* installing *source* package ‘jsonlite’ ...
** package ‘jsonlite’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
parse.c: In function ‘R_parse’:
parse.c:38:32: warning: format not a string literal and no format arguments [-Wformat-security]
   38 |       Rf_errorcall(R_NilValue, errbuf);
      |                                ^~~~~~
push_parser.c: In function ‘R_parse_connection’:
push_parser.c:71:14: warning: format not a string literal and no format arguments [-Wformat-security]
   71 |     Rf_error(errbuf);
      |              ^~~~~~
installing to /usr/lib/R/00LOCK-jsonlite/00new/jsonlite/libs
** R
** inst
** byte-compile and prepare package for lazy loading
ERROR: lazy loading failed for package ‘jsonlite’
* removing ‘/usr/lib/R/jsonlite’## End Task Log ###########################################################################################
Error: Unhandled Exception: child_task=1412081912 child_task_status=failed: Error building image: Error building jsonlite (1.8.4). Build exited with non-zero status: 1

What version of jsonlite? According to R: NEWS this was fixed in 1.8.7:

  • Fix getRversion type (requested by CRAN)

So either use a newer version of jsonlite, or an older version of R, older versions are more relaxed when handling version numbers.

1 Like

I was running 1.8.4 and updating to 1.8.8 fixed the problem. Thank you so much!

1 Like

This topic was automatically closed 7 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.