react-native-cameraroll: Unrecognized generic type 'SubTypes' in NativeModule spec

Hi guys

I got this error when try to install pods with new arch.

System:
  OS: macOS 13.4
  CPU: (10) arm64 Apple M1 Pro
  Memory: 385.67 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 16.18.1
    path: ~/.nvm/versions/node/v16.18.1/bin/node
  Yarn:
    version: 1.22.18
    path: /usr/local/bin/yarn
  npm:
    version: 9.6.3
    path: ~/.nvm/versions/node/v16.18.1/bin/npm
  Watchman:
    version: 2023.05.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.12.1
    path: /Users/danixx/.rvm/rubies/ruby-2.7.6/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.2 AI-222.4459.24.2221.10121639
  Xcode:
    version: 14.3/14E222b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.12
    path: /usr/bin/javac
  Ruby:
    version: 2.7.6
    path: /Users/danixx/.rvm/rubies/ruby-2.7.6/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.0-rc.5
    wanted: ^0.72.0-rc.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
UnsupportedGenericParserError: Module NativeCameraRollModule: Unrecognized generic type 'SubTypes' in NativeModule spec.
    at translateTypeReferenceAnnotation (/Users/danixx/Desktop/connec-fitness-rn/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js:153:15)
    at translateTypeAnnotation (/Users/danixx/Desktop/connec-fitness-rn/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js:224:14)
    at parseObjectProperty (/Users/danixx/Desktop/connec-fitness-rn/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:261:7)
    at /Users/danixx/Desktop/connec-fitness-rn/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js:61:16
    at guard (/Users/danixx/Desktop/connec-fitness-rn/node_modules/@react-native/codegen/lib/parsers/utils.js:26:14)
    at /Users/danixx/Desktop/connec-fitness-rn/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js:60:14
    at Array.map (<anonymous>)
    at translateObjectTypeAnnotation (/Users/danixx/Desktop/connec-fitness-rn/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js:59:6)
    at translateTypeAnnotation (/Users/danixx/Desktop/connec-fitness-rn/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js:320:14)
    at parseObjectProperty (/Users/danixx/Desktop/connec-fitness-rn/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:261:7) {
  nodes: [
    Node {
      type: 'TSTypeReference',
      start: 414,
      end: 422,
      loc: SourceLocation {
        start: Position { line: 16, column: 14, index: 414 },
        end: Position { line: 16, column: 22, index: 422 },
        filename: undefined,
        identifierName: undefined
      },
      typeName: Node {
        type: 'Identifier',
        start: 414,
        end: 422,
        loc: SourceLocation {
          start: Position { line: 16, column: 14, index: 414 },
          end: Position { line: 16, column: 22, index: 422 },
          filename: undefined,
          identifierName: 'SubTypes'
        },
        name: 'SubTypes'
      }
    }
  ]
}
Error: Command failed: node /Users/danixx/Desktop/connec-fitness-rn/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js --platform ios /var/folders/gj/zdd7mjxx5t98dvcc82k72kdc0000gn/T/rncamerarollZj293L/schema.json /Users/danixx/Desktop/connec-fitness-rn/node_modules/@react-native-camera-roll/camera-roll/src
/Users/danixx/Desktop/connec-fitness-rn/node_modules/flow-parser/flow_parser.js:818
throw a}function

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 16 (5 by maintainers)

Most upvoted comments

Error still occurs.

I think it’s hitting this bug https://github.com/facebook/react-native/issues/36431 If I paste the SubType definition into `NativeCameraRoll.ts’ instead of using the import it seems to compile OK

I got the same error with “react-native@0.72.0” & “@react-native/codegen@0.72.6”