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

Pod-install error when New arch enabled #5

Closed
batuhansahan opened this issue Nov 28, 2023 · 5 comments · Fixed by #6
Closed

Pod-install error when New arch enabled #5

batuhansahan opened this issue Nov 28, 2023 · 5 comments · Fixed by #6

Comments

@batuhansahan
Copy link
Contributor

Pod install with
RCT_NEW_ARCH_ENABLED=1 npx pod-install ios

    "react-native-localization-settings": "^1.0.2",
    "react-native": "0.72.7",

Without new arch enabled its working.

error logs.

[Codegen] >>>>> Processing RNLocalizationSettingsSpec


[Codegen] Done.
/Users/usermac/projects/AwesomeProject/node_modules/flow-parser/flow_parser.js:818
throw a}function
^

UnsupportedModulePropertyParserError: Module NativeLocalizationSettings: TypeScript interfaces extending TurboModule must only contain 'FunctionTypeAnnotation's. Property 'language' refers to a 'TSStringKeyword'.
    at throwIfModuleTypeIsUnsupported (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/error-utils.js:163:11)
    at buildPropertySchema (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:415:3)
    at /Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:653:24
    at guard (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/utils.js:26:14)
    at /Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:650:14
    at Array.map (<anonymous>)
    at buildModuleSchema (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:647:6)
    at /Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:466:9
    at guard (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/utils.js:26:14)
    at buildSchemaFromConfigType (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:465:22) {
  nodes: [ undefined ]
}

Node.js v20.3.1
Error: Command failed: node /Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js --platform ios /var/folders/4j/h13xc0w91t17rbdd_mfkp71w0000gn/T/RNLocalizationSettingsSpecTYsvQI/schema.json /Users/usermac/projects/AwesomeProject/node_modules/react-native-localization-settings/src
/Users/usermac/projects/AwesomeProject/node_modules/flow-parser/flow_parser.js:818
throw a}function
^

UnsupportedModulePropertyParserError: Module NativeLocalizationSettings: TypeScript interfaces extending TurboModule must only contain 'FunctionTypeAnnotation's. Property 'language' refers to a 'TSStringKeyword'.
    at throwIfModuleTypeIsUnsupported (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/error-utils.js:163:11)
    at buildPropertySchema (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:415:3)
    at /Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:653:24
    at guard (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/utils.js:26:14)
    at /Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:650:14
    at Array.map (<anonymous>)
    at buildModuleSchema (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:647:6)
    at /Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:466:9
    at guard (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/utils.js:26:14)
    at buildSchemaFromConfigType (/Users/usermac/projects/AwesomeProject/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:465:22) {
  nodes: [ undefined ]
}

Node.js v20.3.1

    at checkExecSyncError (node:child_process:885:11)
    at execSync (node:child_process:957:15)
    at executeNodeScript (/Users/usermac/projects/AwesomeProject/node_modules/react-native/scripts/codegen/generate-artifacts-executor.js:49:3)
    at generateSchema (/Users/usermac/projects/AwesomeProject/node_modules/react-native/scripts/codegen/generate-artifacts-executor.js:329:3)
    at /Users/usermac/projects/AwesomeProject/node_modules/react-native/scripts/codegen/generate-artifacts-executor.js:394:26
    at Array.forEach (<anonymous>)
    at generateNativeCodegenFiles (/Users/usermac/projects/AwesomeProject/node_modules/react-native/scripts/codegen/generate-artifacts-executor.js:383:13)
    at Object.execute (/Users/usermac/projects/AwesomeProject/node_modules/react-native/scripts/codegen/generate-artifacts-executor.js:559:5)
    at Object.<anonymous> (/Users/usermac/projects/AwesomeProject/node_modules/react-native/scripts/generate-codegen-artifacts.js:64:10) {
  status: 7,
  signal: null,
  output: [
    null,
    <Buffer >,
    <Buffer 2f 55 73 65 72 73 2f 62 61 74 75 68 61 6e 73 61 68 61 6e 2f 70 72 6f 6a 65 63 74 73 2f 50 72 6f 6a 65 63 74 2d 44 61 79 66 75 6c 2f 6e 6f 64 65 5f 6d ... 1552 more bytes>
  ],
  pid: 17209,
  stdout: <Buffer >,
  stderr: <Buffer 2f 55 73 65 72 73 2f 62 61 74 75 68 61 6e 73 61 68 61 6e 2f 70 72 6f 6a 65 63 74 73 2f 50 72 6f 6a 65 63 74 2d 44 61 79 66 75 6c 2f 6e 6f 64 65 5f 6d ... 1552 more bytes>
}
@Stafox
Copy link

Stafox commented May 6, 2024

@batuhansahan hey, have you solved this issue somehow?

@batuhansahan
Copy link
Contributor Author

batuhansahan commented May 6, 2024

@batuhansahan hey, have you solved this issue somehow?

I opened a PR for this issue. You can use it.

#6

@Stafox
Copy link

Stafox commented May 6, 2024

Will try prepare a patch based on it. thanks!

@lizhien52O
Copy link

在src/NativeLocalizationSettings.ts删掉language: string;

@youridijk
Copy link

For everyone wanting to use the new architecture: easiest way is to create a patch using Yarn and the PR @batuhansahan created (#6). Instructions can be found here.

@jakex7 jakex7 closed this as completed in #6 Nov 9, 2024
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

Successfully merging a pull request may close this issue.

4 participants