CodePushHash not found working with Code Push

1.3k Views Asked by At

So I'm trying to deploy my React Native app using the App Center and integrate Code Push. I installed the App Center SDK and workds properly but the problem comes when I add the Code Push plugin. It compiles the project nicely and does the sync too, but when I try to install it on my device the build falis saying: "Process 'command 'node'' finished with non-zero exit value 1" and "Error: ENOENT: no such file or directory, open '/home/balistic/Documents/sharryup/android/app/build/intermediates/assets/debug/CodePushHash'"

I'm using React Native 0.56.

1

There are 1 best solutions below

1
On
There is a workaround for this:
In {project_dir}/node_modules/react-native-code-push/android/codepush.gradle (~86-90) just add this three lines:

generateBundledResourcesHash = tasks.create(
        name: "generateBundledResourcesHash${targetName}",
        type: Exec) {
+doFirst {
+jsBundleDir.mkdirs()
+}
    commandLine (*nodeExecutableAndArgs, "${nodeModulesPath}/react-native-code-push/scripts/generateBundledResourcesHash.js", resourcesDir, jsBundleFile, jsBundleDir, resourcesMapTempFileName)
}