Я только что запустил новый нативный проект React, моя версия POD - 1.16.1 , а моя версия RN - 0,81.1 .
Моя сборка iOS работала нормально, но теперь после того, как я установил несколько библиотек и настраивать простые экраны (я тестировал на Android в The The Time). Ошибка:
Сообщение об ошибке:
yarn run v1.22.22
$ react-native run-ios
✔ Installing Ruby Gems
✖ Installing CocoaPods dependencies with New Architecture (this may take a few minutes)
error
[!] Invalid `Podfile` file: undefined method 'instance' for class Pod::Config.
# from /Users/shoaibarif/Projects/cognicreate/reactnative/ios/Podfile:9
# -------------------------------------------
# platform :ios, min_ios_version_supported
> prepare_react_native_project!
#
# -------------------------------------------
✖ Installing CocoaPods dependencies with New Architecture (this may take a few minutes)
error Something went wrong while installing CocoaPods. Please run pod install manually.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command
Я пробовал удалить и переустановить podfile и node_modules , которые не исправляли.# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, min_ios_version_supported
prepare_react_native_project!
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'cognicreate' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
post_install do |installer|
# https://github.com/facebook/react-nativ ... #L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)
end
end
Подробнее здесь: https://stackoverflow.com/questions/797 ... -for-class
React Native - iOS - Неверный файл Podfile: неопределенный метод «экземпляр» для класса pod :: config ⇐ IOS
Программируем под IOS
1758577090
Anonymous
Я только что запустил новый нативный проект React, моя версия POD - 1.16.1 , а моя версия RN - 0,81.1 .
Моя сборка iOS работала нормально, но теперь после того, как я установил несколько библиотек и настраивать простые экраны (я тестировал на Android в The The Time). Ошибка:
[b] Сообщение об ошибке: [/b]
yarn run v1.22.22
$ react-native run-ios
✔ Installing Ruby Gems
✖ Installing CocoaPods dependencies with New Architecture (this may take a few minutes)
error
[!] Invalid `Podfile` file: undefined method 'instance' for class Pod::Config.
# from /Users/shoaibarif/Projects/cognicreate/reactnative/ios/Podfile:9
# -------------------------------------------
# platform :ios, min_ios_version_supported
> prepare_react_native_project!
#
# -------------------------------------------
✖ Installing CocoaPods dependencies with New Architecture (this may take a few minutes)
error Something went wrong while installing CocoaPods. Please run pod install manually.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command
Я пробовал удалить и переустановить podfile и node_modules , которые не исправляли.# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, min_ios_version_supported
prepare_react_native_project!
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'cognicreate' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)
end
end
Подробнее здесь: [url]https://stackoverflow.com/questions/79772082/react-native-ios-invalid-podfile-file-undefined-method-instance-for-class[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия