Skip to content

Commit

Permalink
improve error message in NativeModuleRegistryBuilder.java (#26467)
Browse files Browse the repository at this point in the history
Summary:
## Motivation

I have seen a spike in users reporting this error. Unfortunately I did not receive any repros that would confirm this, but my hypothesis is that they ran into situation when `new XYZPackage()` was present in `getPackages()` method and then the CLI kicked in with autolinking and they were left with this incomplete error.

someone more knowledgeable of autolinking should review this.
Pull Request resolved: #26467

Differential Revision: D17661242

Pulled By: cpojer

fbshipit-source-id: 63dfcd85a0d41d85a0dd52f84ab16cb7ceb64ba2
  • Loading branch information
vonovak authored and facebook-github-bot committed Sep 30, 2019
1 parent 9caf991 commit 113c4e2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public void processPackage(ReactPackage reactPackage) {
+ name
+ " tried to override "
+ existingNativeModule.getClassName()
+ ". Check the getPackages() method in MainApplication.java, it might be that module is being created twice. If this was your intention, set canOverrideExistingModule=true");
+ ". Check the getPackages() method in MainApplication.java, it might be that module is being created twice. If this was your intention, set canOverrideExistingModule=true. "
+ "This error may also be present if the package is present only once in getPackages() but is also automatically added later during build time by autolinking. Try removing the existing entry and rebuild.");
}
mModules.remove(existingNativeModule);
}
Expand Down

0 comments on commit 113c4e2

Please sign in to comment.