Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile the module locally #9

Open
LuD1161 opened this issue Sep 27, 2020 · 2 comments
Open

Can't compile the module locally #9

LuD1161 opened this issue Sep 27, 2020 · 2 comments

Comments

@LuD1161
Copy link
Contributor

LuD1161 commented Sep 27, 2020

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 🤔

@PierreCapo
Copy link
Owner

Mmmmh, that's weird, seems like some typings from react native are missing, I don't understand either what's happening

@LuD1161
Copy link
Contributor Author

LuD1161 commented Sep 27, 2020

Any suggestions what I should do here. I also tried directly installing from npm but in vain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants