Error when using devtools::check(): System command 'Rcmd.exe' failed

I have a Shiny app project built using the golem package. When I try to test it using devtools::check(), I receive the following error:

> devtools::check()
i Updating ExternalizingSpectrum documentation
i Loading ExternalizingSpectrum
Warning: replacing previous import ‘shiny::runExample’ by ‘shinyjs::runExample’ when loading ‘ExternalizingSpectrum’
Writing NAMESPACE
Writing NAMESPACE
-- Building -------------------------------------------------------------------------- ExternalizingSpectrum --
Setting env vars:
* CFLAGS    : -Wall -pedantic -fdiagnostics-color=always
* CXXFLAGS  : -Wall -pedantic -fdiagnostics-color=always
* CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always
---------------------------------------------------------------------------------------------------------------
√  checking for file 'D:\Documents\GitHub\ExternalizingSpectrum/DESCRIPTION' ...
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     problem creating directory C:\Users\Isaac\AppData\Local\Temp\RtmpollKiG\Rbuildc1c47e6b390f\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\bslib\themer-demo\deploy\rsconnect\connect.rstudioservices.com\carson: No such file or directory
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     problem creating directory C:\Users\Isaac\AppData\Local\Temp\RtmpollKiG\Rbuildc1c47e6b390f\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\DT\htmlwidgets\lib\datatables-plugins\filtering\accent-neutralise: No such file or directory
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     problem creating directory C:\Users\Isaac\AppData\Local\Temp\RtmpollKiG\Rbuildc1c47e6b390f\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\DT\htmlwidgets\lib\datatables-plugins\filtering\diacritics-neutralise: No such file or directory
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     problem creating directory C:\Users\Isaac\AppData\Local\Temp\RtmpollKiG\Rbuildc1c47e6b390f\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\DT\htmlwidgets\lib\datatables-plugins\pagination\full_numbers_no_ellipses: No such file or directory
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     problem creating directory C:\Users\Isaac\AppData\Local\Temp\RtmpollKiG\Rbuildc1c47e6b390f\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\DT\htmlwidgets\lib\datatables-plugins\pagination\simple_numbers_no_ellipses: No such file or directory
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     over-long path
    ERROR
   copying to build directory failed
Error in (function (command = NULL, args = character(), error_on_status = TRUE,  : 
  System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last 10 lines):
E> Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
E>   problem creating directory C:\Users\Isaac\AppData\Local\Temp\RtmpollKiG\Rbuildc1c47e6b390f\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\DT\htmlwidgets\lib\datatables-plugins\pagination\full_numbers_no_ellipses: No such file or directory
E> Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
E>   over-long path
E> Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
E>   problem creating directory C:\Users\Isaac\AppData\Local\Temp\RtmpollKiG\Rbuildc1c47e6b390f\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\ExternalizingSpectrum\renv\library\R-4.0\x86_64-w64-mingw32\DT\htmlwidgets\lib\datatables-plugins\pagination\simpl
[...]
Type .Last.error.trace to see where the error occured

It appears that the check is failing because it's trying to copy it to a new path that is too long (and that is much longer than the current path). Your help would be greatly appreciated.

Thanks in advance!

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.