Skip to content
This repository has been archived by the owner on Jul 23, 2023. It is now read-only.

Failed to build the package #42

Closed
ErvanCH opened this issue Dec 8, 2018 · 8 comments
Closed

Failed to build the package #42

ErvanCH opened this issue Dec 8, 2018 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@ErvanCH
Copy link
Collaborator

ErvanCH commented Dec 8, 2018

Hey Mauro,
I have a couple of changes to the package (remove stuff and update scripts). I'd like now to rebuild the package to get the ints/extdata/data folder updated and use it to update the readme.
However, after having passed the check, I can install and build the package. It says that "data.table" is missing... (see below). Any clue?
image

@ErvanCH ErvanCH added the bug Something isn't working label Dec 8, 2018
@maurolepore
Copy link
Contributor

Do you have data.talble installed? Maybe close all other R sessions, restart R, and re-install data.table.

Also, data.table should be listed under Imports: in DESCRIPTION. You can add it manually or via `usethis::use_package("data.table").

Then document with devtools::document() and re run devtools::check().

@ErvanCH
Copy link
Collaborator Author

ErvanCH commented Dec 8, 2018

I see. I think it is looking into the standard library, whereas I am storing packages into an external R library. Will update that too. Any chance to point toward a "non-standard" lib location?
Thanks for your prompt reply
E

@ErvanCH
Copy link
Collaborator Author

ErvanCH commented Dec 8, 2018

I reinstalled "data.table", check that it was mentioned in Imports, rerun document(), but it still crash with the same message...

@ErvanCH
Copy link
Collaborator Author

ErvanCH commented Dec 8, 2018

Hey Mauro, could you connect to Github and try to build the package as it is? I'd be curious to see if you can do it or not. I don't understand what is happening with data.table. I am sure you will.
Thanks
E

@ErvanCH
Copy link
Collaborator Author

ErvanCH commented Dec 8, 2018

To my understanding, it is wrongly written "data.table**,**" somewhere (instead of "data.table") ... and it as a fact can't find the package. How shall I locate where this is wrongly written?
Thanks
E

@ErvanCH
Copy link
Collaborator Author

ErvanCH commented Dec 8, 2018

Found it!!! It was in damned NAMESPACE!!

@ErvanCH ErvanCH closed this as completed Dec 8, 2018
@maurolepore
Copy link
Contributor

maurolepore commented Dec 9, 2018

Great you solved it. I'm curious about how NAMESPACE got corrupt. It's not supposed to be edited manually

# Generated by roxygen2: do not edit by hand

But I have experienced similar issues. I never edit NAMESPACE manually but when I'm stuck I delete it and re-document with devtools::document() -- which re-creates NAMESPACE and often fixes the problem. I never bothered to track the problem to see what I did wrong or if it's an issue I should report to roxygen2. But if you know what happended please let me know.

@maurolepore
Copy link
Contributor

BTW, you can update the data in inst/extdata/data manually. Then you'll need to re-install the package (devtools::install()) to copy that data from your project into the installed folder in your chosen library.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants