--no-staged-install ERROR

Dear all,
I am developing an R package. Since the last update of RStudio and R I get the following error message when choosing "Install and Restart"


** testing if installed package keeps a record of temporary installation path
ERROR: hard-coded installation path: please report to the package maintainer and use ‘--no-staged-install’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/act’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/act’

Exited with status 1.

I have tried to use the ‘--no-staged-install’ option but then the library does not work anymore as desired.

Can anyone help me to identify what I need to change in my code to use the normal installation?

All the best,
Oliver

2 Likes

@oliverehmer Welcome to RStudio Community!

This appears to be a new option in R 3.6.

Do you ever use system.file() to access files in your package? Reading the announcement of the Staged Install check, this is one of the common sources of the error.

The announcement also mentions that you can opt out of the check by adding StagedInstall: no to your DESCRIPTION file. Maybe that will work better than the flag --no-staged-install.

And if you need a quick fix, you could always downgrade to R 3.5 until you figure out how to handle the new R 3.6 behavior.

Resources:

Dear John,
thank you so much for your help and your time. Problem solved!
All the best,
Oliver

1 Like

@oliverehmer Great! I'm glad you solved the problem.

For future readers of this thread, could you please mark a solution (either my post or you can write-up a more detailed description of how you fixed it).

This suggestion did the trick for me:

1 Like

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