Skip to content

Commit 4cb7ebf

Browse files
authored
log a message if during prepare on android an exception is thrown (most likely caused by previously traversed cyclic dependencies) (#2604)
1 parent 242cd3b commit 4cb7ebf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/services/android-project-service.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,11 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
396396
let checkV8dependants = path.join(buildDir, "check-v8-dependants.js");
397397
if (this.$fs.exists(checkV8dependants)) {
398398
let stringifiedDependencies = JSON.stringify(dependencies);
399-
await this.spawn('node', [checkV8dependants, stringifiedDependencies, projectData.platformsDir], { stdio: "inherit" });
399+
try {
400+
await this.spawn('node', [checkV8dependants, stringifiedDependencies, projectData.platformsDir], { stdio: "inherit" });
401+
} catch (e) {
402+
this.$logger.info("Checking for dependants on v8 public API failed. This is likely caused because of cyclic production dependencies. Error code: " + e.code + "\nMore information: https://github.com/NativeScript/nativescript-cli/issues/2561");
403+
}
400404
}
401405
}
402406

0 commit comments

Comments
 (0)