Error: Could not find package root.

1,427 views
Skip to first unread message

Timothy Bates

unread,
Oct 22, 2018, 10:57:13 AM10/22/18
to devtools
after the prompt 

> Have
> you checked on win-builder (with `check_win_devel()`)?
> 1: I agree
> 2: Nope
> 3: I forget
>  Selection: 1

I get 

> Error: Could not find package root.

PS: Is it intended that "release" no longer runs `R CMD check` ( the new version of devtools "Have you run `R CMD check`  locally?

running `packageVersion("devtools")`
[1] ‘1.13.6.9000’

Timothy Bates

unread,
Dec 18, 2018, 2:16:12 PM12/18/18
to devtools
Any clues on this? I'm still getting  "Error: Could not find package root."

duckduckgo'ing that error yields nothing except a cryptic comment about DESCRIPTION. I have a DESCRIPTION field...

Gábor Csárdi

unread,
Dec 18, 2018, 2:17:16 PM12/18/18
to Timothy Bates, devtools
We would need a reproducible example, I am afraid.

Gabor

On Tue, Dec 18, 2018 at 7:16 PM Timothy Bates <timothy...@gmail.com> wrote:
>
> Any clues on this? I'm still getting "Error: Could not find package root."
>
> duckduckgo'ing that error yields nothing except a cryptic comment about DESCRIPTION. I have a DESCRIPTION field...
>
> --
> You received this message because you are subscribed to the Google Groups "devtools" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rdevtools+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Timothy Bates

unread,
Dec 18, 2018, 2:25:40 PM12/18/18
to devtools
Thanks Gábor, 
I guess the repro would be to pull my package 

github_install("tbates/umx") 

and try 

devtools::release(pkg = "~/bin/umx", check = FALSE)

this produces the error. A traceback yields:

> traceback()
5: stop("Could not find package root.", call. = FALSE)
4: package_file(path = x)
3: as.package(pkg)
2: find_release_questions()
1: devtools::release(pkg = "~/bin/umx", check = FALSE)


The package passes win build. I'm using
packageVersion("devtools")
[1] ‘2.0.1.9000’

Gábor Csárdi

unread,
Dec 18, 2018, 2:30:54 PM12/18/18
to Timothy Bates, devtools
What is github_install?

Gabor

Timothy Bates

unread,
Dec 18, 2018, 2:32:09 PM12/18/18
to devtools
sorry typing rather than coding

install_github("tbates/umx")
 

Timothy Bates

unread,
Dec 18, 2018, 10:27:39 PM12/18/18
to devtools
SO, the answer to this is that correctly setting "pkg=" in functions like release() is no longer sufficient for the function to work. This seems like a bug to me.

The solution is to `setwd("~/path/to/package")` 
Reply all
Reply to author
Forward
0 new messages