Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: 'create' is not an exported object from 'namespace:devtools' #2104

Closed
bennlich opened this issue Sep 6, 2019 · 7 comments
Closed

Comments

@bennlich
Copy link

bennlich commented Sep 6, 2019

I installed devtools with packages.install('devtools') and it eventually installed without error. I can't seem to use any of its methods though?

> devtools::create("atp-analytics")
Error: 'create' is not an exported object from 'namespace:devtools'
> devtools::use_package()
Error: 'use_package' is not an exported object from 'namespace:devtools'

I feel like I must be missing some trivial step...

> version
               _                           
platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          3                           
minor          5.2                         
year           2018                        
month          12                          
day            20                          
svn rev        75870                       
language       R                           
version.string R version 3.5.2 (2018-12-20)
nickname       Eggshell Igloo       
@jennybc
Copy link
Member

jennybc commented Sep 7, 2019

devtools did drop create(), in favour of usethis::create_package().

In an upcoming release, devtools::create() will be restored, to support backwards compatibility with older versions of RStudio, But it's still a better idea to call usethis::create_package().

use_package() (and all functions in usethis) are made available by devtools, but the function actually lives in usethis. So if you want to call it in a namespace-qualified way, it must be usethis::use_package(). Or, after attaching devtools via library(devtools), you can just call use_package() directly. But you cannot call it via devtools::use_package().

More about the relationship between devtools and usethis:

@jennybc jennybc closed this as completed Sep 7, 2019
@bennlich
Copy link
Author

bennlich commented Sep 8, 2019

Thank you! This is super helpful.

Maybe worth updating the cheatsheet on the homepage?

@jennybc
Copy link
Member

jennybc commented Sep 8, 2019

Maybe worth updating the cheatsheet on the homepage?

Excellent point! Will you open a new issue about that? Looks like that dates back to January 2015.

@bennlich
Copy link
Author

bennlich commented Sep 9, 2019

Done! #2107

@vojtechhuser
Copy link

I just had the same errror and this helped me

@JimShady
Copy link

^and me

@lock
Copy link

lock bot commented May 5, 2020

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants