Skip to content

Can't compile the module locally #9

@LuD1161

Description

@LuD1161

Hi @PierreCapo
Thanks a lot for this library.
I am trying to compile this library locally, however I am getting 14 errors.
image

src/Instagram/index.tsx:41:25 - error TS2349: This expression is not callable.
  No constituent of type 'ViewStyle | TextStyle | ImageStyle' is callable.

41     <View style={styles.container(containerBorderRadius)}>
                           ~~~~~~~~~

src/Instagram/index.tsx:45:11 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(props: Readonly<ImageProps>): Image', gave the following error.
    Type 'ViewStyle | TextStyle | ImageStyle' is not assignable to type 'StyleProp<ImageStyle>'.
      Type 'ViewStyle' is not assignable to type 'StyleProp<ImageStyle>'.
        Type 'ViewStyle' is not assignable to type 'ImageStyle'.
          Types of property 'overflow' are incompatible.
            Type '"hidden" | "visible" | "scroll" | undefined' is not assignable to type '"hidden" | "visible" | undefined'.
              Type '"scroll"' is not assignable to type '"hidden" | "visible" | undefined'.
  Overload 2 of 2, '(props: ImageProps, context?: any): Image', gave the following error.
    Type 'ViewStyle | TextStyle | ImageStyle' is not assignable to type 'StyleProp<ImageStyle>'.
      Type 'ViewStyle' is not assignable to type 'StyleProp<ImageStyle>'.
        Type 'ViewStyle' is not assignable to type 'ImageStyle'.

45           style={styles.profilePicture}
             ~~~~~

  node_modules/@types/react-native/index.d.ts:3804:5
    3804     style?: StyleProp<ImageStyle>;
             ~~~~~
    The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<Image> & Readonly<ImageProps> & Readonly<{ children?: ReactNode; }>'
  node_modules/@types/react-native/index.d.ts:3804:5
    3804     style?: StyleProp<ImageStyle>;
             ~~~~~
    The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<Image> & Readonly<ImageProps> & Readonly<{ children?: ReactNode; }>'

src/Instagram/index.tsx:51:13 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(props: Readonly<ImageProps>): Image', gave the following error.
    Type 'ViewStyle | TextStyle | ImageStyle' is not assignable to type 'StyleProp<ImageStyle>'.
      Type 'ViewStyle' is not assignable to type 'StyleProp<ImageStyle>'.
        Type 'ViewStyle' is not assignable to type 'ImageStyle'.
  Overload 2 of 2, '(props: ImageProps, context?: any): Image', gave the following error.
    Type 'ViewStyle | TextStyle | ImageStyle' is not assignable to type 'StyleProp<ImageStyle>'.
      Type 'ViewStyle' is not assignable to type 'StyleProp<ImageStyle>'.
        Type 'ViewStyle' is not assignable to type 'ImageStyle'.

51             style={styles.verified}
               ~~~~~

  node_modules/@types/react-native/index.d.ts:3804:5
    3804     style?: StyleProp<ImageStyle>;
             ~~~~~
    The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<Image> & Readonly<ImageProps> & Readonly<{ children?: ReactNode; }>'
  node_modules/@types/react-native/index.d.ts:3804:5
    3804     style?: StyleProp<ImageStyle>;
             ~~~~~
    The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<Image> & Readonly<ImageProps> & Readonly<{ children?: ReactNode; }>'

src/Instagram/index.tsx:80:31 - error TS2349: This expression is not callable.
  No constituent of type 'ViewStyle | TextStyle | ImageStyle' is callable.

80                 style={styles.postImage(
                                 ~~~~~~~~~

src/Twitter/TwitterText.tsx:84:7 - error TS2322: Type '(string | Element)[]' is not assignable to type 'string[]'.
  Type 'string | Element' is not assignable to type 'string'.
    Type 'Element' is not assignable to type 'string'.

84       transformedText = transformTextToAddColors(
         ~~~~~~~~~~~~~~~

src/Twitter/TwitterText.tsx:93:5 - error TS2322: Type '(string | Element)[]' is not assignable to type 'string[]'.

93     transformedText = transformTextToAddColors(
       ~~~~~~~~~~~~~~~

src/Twitter/TwitterText.tsx:103:5 - error TS2322: Type '(string | Element)[]' is not assignable to type 'string[]'.

103     transformedText = transformTextToAddColors(
        ~~~~~~~~~~~~~~~

src/Twitter/TwitterText.tsx:113:5 - error TS2322: Type '(string | Element)[]' is not assignable to type 'string[]'.

113     transformedText = transformTextToAddColors(
        ~~~~~~~~~~~~~~~

src/Twitter/index.tsx:73:27 - error TS2349: This expression is not callable.
  No constituent of type 'ViewStyle | TextStyle | ImageStyle' is callable.

73       <View style={styles.container(containerBorderRadius)}>
                             ~~~~~~~~~

src/Twitter/index.tsx:97:35 - error TS2349: This expression is not callable.
  No constituent of type 'ViewStyle | TextStyle | ImageStyle' is callable.

97               <View style={styles.embedContainer(cornerRadius)}>
                                     ~~~~~~~~~~~~~~

src/Twitter/index.tsx:105:35 - error TS2349: This expression is not callable.
  No constituent of type 'ViewStyle | TextStyle | ImageStyle' is callable.

105               <View style={styles.embedContainer(cornerRadius)}>
                                      ~~~~~~~~~~~~~~

src/Twitter/index.tsx:109:35 - error TS2349: This expression is not callable.
  No constituent of type 'ViewStyle | TextStyle | ImageStyle' is callable.

109               <View style={styles.embedContainer(cornerRadius)}>
                                      ~~~~~~~~~~~~~~

src/Twitter/index.tsx:118:35 - error TS2349: This expression is not callable.
  No constituent of type 'ViewStyle | TextStyle | ImageStyle' is callable.

118               <View style={styles.embedContainer(cornerRadius)}>
                                      ~~~~~~~~~~~~~~

src/Twitter/index.tsx:153:17 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(props: Readonly<ImageProps>): Image', gave the following error.
    Type 'ViewStyle | TextStyle | ImageStyle' is not assignable to type 'StyleProp<ImageStyle>'.
      Type 'ViewStyle' is not assignable to type 'StyleProp<ImageStyle>'.
        Type 'ViewStyle' is not assignable to type 'ImageStyle'.
  Overload 2 of 2, '(props: ImageProps, context?: any): Image', gave the following error.
    Type 'ViewStyle | TextStyle | ImageStyle' is not assignable to type 'StyleProp<ImageStyle>'.
      Type 'ViewStyle' is not assignable to type 'StyleProp<ImageStyle>'.
        Type 'ViewStyle' is not assignable to type 'ImageStyle'.

153                 style={styles.heart}
                    ~~~~~

  node_modules/@types/react-native/index.d.ts:3804:5
    3804     style?: StyleProp<ImageStyle>;
             ~~~~~
    The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<Image> & Readonly<ImageProps> & Readonly<{ children?: ReactNode; }>'
  node_modules/@types/react-native/index.d.ts:3804:5
    3804     style?: StyleProp<ImageStyle>;
             ~~~~~
    The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<Image> & Readonly<ImageProps> & Readonly<{ children?: ReactNode; }>'


Found 14 errors.

Am I missing some step 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions