react-native clang:错误:链接器命令失败,退出代码为1

时间:2019-01-15 05:15:19

标签: xcode react-native react-native-ios

我试图在Xcode中构建我的react-native项目以在App Store中发布,但是构建失败并显示错误


/**
 * I "think" you need this. Docs don't explain how its fully used
 */
Parse.User.allowCustomUserClass(true);

export class User extends Parse.User {

  constructor() {
    super('User');
  }

  isThisUserAnAdmin(): boolean {
    return !(!this.get('IsAdmin));
  }
}

Parse.Object.registerSubclass('User', User);

/**
 * Then I want to use it and call specific 'Parse.User' superclass
 * functions + get the actual `User` model and NOT the `Parse.User`
 */
const makeAnAdmin = async (email: string, password: string): Promise<User> => {
  return User.signUp(email, password,
    {
      email: email,
      isAdmin: false
    }
  );
}

我不确定如何继续。我的项目中有facebook sdk和react-native-firebase。能否请你帮我什么可能是错的。谢谢。

1 个答案:

答案 0 :(得分:1)

clang: error: linker command failed with exit code 1 (use -v to see invocation)

此错误通常发生在react-native-ios中未正确安装节点模块时。最好检查一下Pod是否正确安装或是否包含.xcodeproj并正确链接到项目。

react-native link

react-native链接未正确链接所有软件包。因此,请手动或使用cocoapods重新检查它。

如果共享了来自pod的更多信息,我可以帮助您找到正确的模块。