demchenkoalex / react-native-module-template

A starter for the React Native library written in TypeScript, with linked example project and optional native code in Swift and Kotlin.
MIT License
216 stars 36 forks source link

[!] No podspec found for `@package` in `../node_modules/@package/needed_package` #53

Closed abdullahIsa closed 1 year ago

abdullahIsa commented 1 year ago

Hello everything was working well between multiple created packages but after installing it into main existing project and i tried doing pod install in ios directory, i got that error even though there is needed_package.podspec inside node_modules/@package/needed_package

Note: all this packages i am creating are from private organization repositories. Need help in going further, thanks.

abdullahIsa commented 1 year ago

I found the issue



package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
  s.name         = package['name'] // this was providing "@package/needed_package" since it wasnt named as that you can add a new key in ur package.json and change to package['package_name']
  s.version      = package['version']
  s.summary      = package['description']
  s.license      = package['license']

  s.authors      = package['author']
  s.homepage     = package['homepage']
  s.platform     = :ios, "10.0"

  s.source       = { :git => "https://github.com/@package/needed_package.git", :tag => "v#{s.version}" }
  s.source_files  = "ios/**/*.{h,m,swift}"

  s.dependency 'React'
end```

if anyone faces this issue make sure ur package.json matches the needed_package.podspec