Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Fix error: CodePushHash: Resource and asset merger: Duplicate resources #2574

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/generateBundledResourcesHash.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ function addJsBundleAndMetaToManifest() {
console.log(finalHash);

var savedResourcesManifestPath = assetsDir + "/" + CODE_PUSH_HASH_FILE_NAME;
if (fs.existsSync(savedResourcesManifestPath)) {
fs.unlinkSync(savedResourcesManifestPath);
}
fs.writeFileSync(savedResourcesManifestPath, finalHash);

// "CodePushHash.json" file name breaks flow type checking.
Expand Down Expand Up @@ -122,4 +125,4 @@ function fileExists(file) {

if (tempFileLocalPath) {
fs.unlinkSync(tempFileLocalPath);
}
}