Fail to initialize packrat/ Errors occurred when fetching source files
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am trying to initialize packrat within a project and it starts creating the packrat folder but then in the end it pops up this error:
Error in snapshotSources(project, activeRepos(project), allRecordsFlat) :
Errors occurred when fetching source files:
Error in getSourceForPkgRecord(pkgRecord, sourceDir, availablePkgs, repos) :
Failed to retrieve package sources for bit64 0.9-7 from CRAN (internet connectivity issue?) [0.9-8 is current]
Error in getSourceForPkgRecord(pkgRecord, sourceDir, availablePkgs, repos) :
Failed to retrieve package sources for dichromat 2.0-0 from CRAN (internet connectivity issue?) [2.0-1 is current]
Error in getSourceForPkgRecord(pkgRecord, sourceDir, availablePkgs, repos) :
Failed to retrieve package sources for foreach 1.4.4 from CRAN (internet connectivity issue?) [1.5.1 is current]
Error in getSourceForPkgRecord(pkgRecord, sourceDir, availablePkgs, repos) :
Failed to retrieve package sources for timeDate 3043.102 from CRAN (internet connectivity issue?) [3043.103 is current]
I then installed the development version of the package but still getting it.
Is there an easy solution to this or smth I am doing wrong?
traceback()
6: stop("Errors occurred when fetching source files:\n", errors)
5: snapshotSources(project, activeRepos(project), allRecordsFlat)
4: snapshotImpl(project, lib.loc = NULL, ignore.stale = TRUE, fallback.ok = TRUE,
infer.dependencies = infer.dependencies)
3: initImpl(project, options, enter, restart, infer.dependencies)
2: withCallingHandlers(initImpl(project, options, enter, restart,
infer.dependencies), error = function(e) {
for (i in seq_along(priorStructure)) {
file <- names(priorStructure)[[i]]
fileExistedBefore <- priorStructure[[i]]
fileExistsNow <- file.exists(file)
if (!fileExistedBefore && fileExistsNow) {
unlink(file, recursive = TRUE)
}
}
})
1: packrat::init()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at packrat::init() and follow the traceback through initImpl, snapshotImpl, snapshotSources, and getSourceForPkgRecord. Reproduce initialization with the listed package versions and investigate why source retrieval reports an internet connectivity issue while newer CRAN versions exist. Done means packrat initialization completes and the package sources are fetched successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100