POD安装失败?

发布于 2025-01-22 22:52:57 字数 2197 浏览 1 评论 0 原文

我正在运行

pod install

安装doubleconversion(1.1.6)

[!]错误安装DoubleConconversion [! conversion.git /var/folders/b4/0h5z4ll13k30c3dq47jlxqph0000gn/T/d20220420-94085-oe9kq1 --template= --single-branch --depth 1 --branch v1.1.6

Cloning into '/var/folders/ B4/0H5Z4LL13K30C3DQ47JLXQPH0000GN/T/D20220420-94085-OE9KQ1'... 致命:远程错误: 不再支持端口9418上未经验证的GIT协议。 请参阅 https://github.blog.blog/2021-09 -01-助理 - 实用结构结构化github/以获取更多信息。

Podfile

require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")

platform :ios, '12.0'

require 'json'
podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {}

target 'MyAPP' do
  use_expo_modules!
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes'
  )

  # Uncomment to opt-in to using Flipper
  #
  # if !ENV['CI']
  #   use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')
  # end

  post_install do |installer|
    react_native_post_install(installer)

    # Workaround `Cycle inside FBReactNativeSpec` error for react-native 0.64
    # Reference: https://github.com/software-mansion/react-native-screens/issues/842#issuecomment-812543933
    installer.pods_project.targets.each do |target|
      if (target.name&.eql?('FBReactNativeSpec'))
        target.build_phases.each do |build_phase|
          if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
            target.build_phases.move(build_phase, 0)
          end
        end
      end
    end
  end

end

我最近安装了可可荚,所以我知道这是最新版本。想法?

I am running

pod install

Installing DoubleConversion (1.1.6)

[!] Error installing DoubleConversion
[!] /usr/bin/git clone https://github.com/google/double-conversion.git /var/folders/b4/0h5z4ll13k30c3dq47jlxqph0000gn/T/d20220420-94085-oe9kq1 --template= --single-branch --depth 1 --branch v1.1.6

Cloning into '/var/folders/b4/0h5z4ll13k30c3dq47jlxqph0000gn/T/d20220420-94085-oe9kq1'...
fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

Podfile

require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")

platform :ios, '12.0'

require 'json'
podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {}

target 'MyAPP' do
  use_expo_modules!
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes'
  )

  # Uncomment to opt-in to using Flipper
  #
  # if !ENV['CI']
  #   use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')
  # end

  post_install do |installer|
    react_native_post_install(installer)

    # Workaround `Cycle inside FBReactNativeSpec` error for react-native 0.64
    # Reference: https://github.com/software-mansion/react-native-screens/issues/842#issuecomment-812543933
    installer.pods_project.targets.each do |target|
      if (target.name&.eql?('FBReactNativeSpec'))
        target.build_phases.each do |build_phase|
          if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
            target.build_phases.move(build_phase, 0)
          end
        end
      end
    end
  end

end

I recently install cocoa pods so I know it's the latest version. Thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

七婞 2025-01-29 22:52:57

您可能只有一些可以通过重置某些内容来解决的构建问题。这不是一个完美的列表,但是当我遇到诸如双重转换错误之类的事情时,这就是我要做的,尤其是如果它似乎已经开始“无处不在”。

由于这似乎是一个豆荚问题,因此您可以从删除吊舱并重新安装它们开始:

cd ios
rm -rf Pods
pod install

我还可以清洁您的构建文件夹!

删除node_modules并重新安装它们也是一个不错的选择,但它可能与POD有关!但是,这不会受到伤害:

rm -rf node_modules
yarn install // or npm install

You may just have some build issues that can be fixed by resetting certain things. This is not a perfect list, but it's what I do when I have things like a Double Conversion error, especially if it seems to have started happening "out of nowhere."

Since this seems to be a pods issue, you could start by removing Pods and reinstalling them:

cd ios
rm -rf Pods
pod install

I would also clean your build folder!
enter image description here

Removing node_modules and reinstalling them is also a good option, but it's likely related to Pods! This won't hurt though:

rm -rf node_modules
yarn install // or npm install
紧拥背影 2025-01-29 22:52:57

正如原木建议您查看的那样


有关更多详细信息。


如果您基本上会检查它

“ git://不再支持未经身份验证的github的协议
请求“

您需要检查您的 package.json 文件,并确保任何依赖项不应以 git开头到URL以 https://domain/repo.git [email  procepted] :user/repo.git

我建议将其转换为 https:// code>键


请删除节点模块文件夹,然后 YARN/NPM安装,然后进入 ios project,然后做 pod install
作为预防措施,我们可以考虑删除驾驶数据清洁构建文件夹

As logs suggest you to to see

https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git
for more details.

if you would check that it basically says

"git:// protocol is not supported anymore for unauthenticated GitHub
requests"

You would need to check your package.json file and make sure any of the dependencies should not have starting with git:// if there are then convert all of them to the URL starts with https://domain/repo.git or [email protected]:user/repo.git.

I would suggest to convert those to https:// to avoid the hassle of setting up SSH key.

Important Step:
do delete node modules folder then yarn/npm install as well then go inside ios project and do pod install.
as a precaution we may consider deleting drived data and clean build folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文