I created our react-native library with:
npx create-react-native-library@latest new-project
I updated the podfile as :
platform :ios, '12.0'
ws_dir = Pathname.new(__dir__)
ws_dir = ws_dir.parent until
File.exist?("#{ws_dir}/node_modules/react-native-test-app/test_app.rb") ||
ws_dir.expand_path.to_s == '/'
require "#{ws_dir}/node_modules/react-native-test-app/test_app.rb"
workspace 'NewProjectReactNativeExample.xcworkspace'
use_test_app!
target 'NewProjectReactNativeExample' do
use_react_native!({
:path => "#{ws_dir}/node_modules/react-native",
:hermes_enabled => false
})
pod 'newproject-react-native', :path => '../..'
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
It keeps giving the below error:
[!] Invalid `Podfile` file: Couldn't find the React Native package.json file at [file_location]
despite trying the file location with hard coding and as shown, it keeps giving the same error. The package.json file is definitely there.
#{ws_dir}/node_modules/react-native"
I’m creating a new library to upgrade the existing library from 0.67.5 to 0.74.4 with Native Modules.
It builds the node-modules with yarn properly.
Any ideas about what to change or check?