Skip to content

Commit

Permalink
don't log initial failure, this seems to happen quite a lot and it se…
Browse files Browse the repository at this point in the history
…ems always fixed by clearing parcel cache and doing single retry
  • Loading branch information
pieh committed Jun 22, 2022
1 parent 68721f6 commit ba0499e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/gatsby/src/utils/parcel/compile-gatsby-files.ts
Expand Up @@ -89,14 +89,18 @@ export async function compileGatsbyFiles(
sourceFileLocation: bundle.getMainEntry()?.filePath,
},
})
} else if (retry > 0) {
// first retry is most flaky and it seems it always get in good state
// after that - most likely cache clearing is the trick that fixes the problem
reporter.verbose(
`Failed to import compiled file "${
bundle.filePath
}" after retry, attempting another retry (#${
retry + 1
} of ${RETRY_COUNT}) - "${e.message}"`
)
}

reporter.verbose(
`Failed to import compiled file "${bundle.filePath}", retrying (#${
retry + 1
} of ${RETRY_COUNT}) - "${e.message}"`
)

// sometimes parcel cache gets in weird state
await remove(getCacheDir(siteRoot))

Expand Down

0 comments on commit ba0499e

Please sign in to comment.