fabOnReact / react-native-notes

MIT License
0 stars 0 forks source link

old version of cli-platform-ios package removed arguments for native_module.rb #17

Closed fabOnReact closed 11 months ago

fabOnReact commented 11 months ago

Description

https://github.com/facebook/react-native/blob/ce692138edaf80c5c2a4ff725ad9f20ab76bfad9/packages/rn-tester/Podfile#L1

[!] Invalid `Podfile` file: [!] /opt/homebrew/bin/node -p require.resolve(
    "@react-native-community/cli-platform-ios/native_modules.rb",
    {paths: [process.argv[1]]},
  ) /Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/react-native/scripts

node:internal/modules/cjs/loader:1075
  throw err;
  ^

Error: Cannot find module '@react-native-community/cli-platform-ios/native_modules.rb'
Require stack:
- /Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/rn-tester/[eval]
    at Module._resolveFilename (node:internal/modules/cjs/loader:1072:15)
    at Function.resolve (node:internal/modules/helpers:127:19)
    at [eval]:1:9
    at Script.runInThisContext (node:vm:122:12)
    at Object.runInThisContext (node:vm:298:38)
    at node:internal/process/execution:83:21
    at [eval]-wrapper:6:24
    at runScript (node:internal/process/execution:82:62)
    at evalScript (node:internal/process/execution:104:10)
    at node:internal/main/eval_string:50:3 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/rn-tester/[eval]'
  ]
}

Node.js v20.3.1

fixed by bumping deps to 13.1.0

https://github.com/facebook/react-native/blob/ce692138edaf80c5c2a4ff725ad9f20ab76bfad9/packages/react-native/package.json#L98-L100

https://github.com/react-native-community/cli/commits/main/packages/cli-platform-ios/native_modules.rb

React Native Version

0.74

Output of npx react-native info

.

Steps to reproduce

cd packages/rn-tester
bundle install // no error
bundle exec pod install

Snack, screenshot, or link to a repository

Screenshot 2023-12-16 at 12 03 36 PM
fabOnReact commented 11 months ago

after fixing the issue above:

[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json

[!] Invalid `Podfile` file: [!] /opt/homebrew/bin/node ./../react-native/scripts/generate-codegen-artifacts.js -p /Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/rn-tester -o /Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/rn-tester -c /Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/rn-tester/node_modules

[Codegen] Analyzing /Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/rn-tester/package.json

[Codegen] >>>>> Searching for codegen-enabled libraries in the project dependencies.
[Codegen] Found react-native

[Codegen] >>>>> Searching for codegen-enabled libraries in the app
[Codegen] Found @react-native/tester

[Codegen] >>>>> Processing FBReactNativeSpec

[Codegen] >>>>> Processing rncore

[Codegen] >>>>> Processing AppSpecs

[Codegen] Done.
Error: Unsupported param type for method "callNativeMethodToAddOverlays", param "overlayColors". Found $ReadOnlyArray
    at /Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/react-native-codegen/lib/parsers/flow/components/commands.js:77:15
    at Array.map (<anonymous>)
    at buildCommandSchema (/Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/react-native-codegen/lib/parsers/flow/components/commands.js:35:40)
    at /Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/react-native-codegen/lib/parsers/flow/components/commands.js:102:22
    at Array.map (<anonymous>)
    at getCommands (/Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/react-native-codegen/lib/parsers/flow/components/commands.js:102:6)
    at buildComponentSchema (/Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/react-native-codegen/lib/parsers/flow/components/index.js:36:20)
    at buildSchemaFromConfigType (/Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/react-native-codegen/lib/parsers/parsers-commons.js:456:34)
    at buildSchema (/Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/react-native-codegen/lib/parsers/parsers-commons.js:520:10)
    at FlowParser.parseString (/Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/react-native-codegen/lib/parsers/flow/parser.js:133:12)
.

 #  from /Users/fabriziobertoglio/Sourcecode/opensource/react-native/packages/rn-tester/Podfile:45
 #  -------------------------------------------
 #
 >    use_react_native!(
 #      path: @prefix_path,
 #  -------------------------------------------
fabOnReact commented 11 months ago

https://github.com/facebook/react-native/pull/41897/files https://github.com/facebook/react-native/issues/36817