使用 "bundle exec Fastlane beta" 构建 iOS 应用时出现问题

Trouble when building iOS app using "bundle exec Fastlane beta"

我正在尝试构建并上传到 Apple Developer iOS 使用 react-native 构建的应用程序。

这是我正在执行的命令:

bundle exec fastlane beta

这是我在 'build app' 步骤中遇到的错误:

[15:57:22]: $ set -o pipefail && xcodebuild -workspace mobile.xcworkspace -scheme mobile -destination 'generic/platform=iOS' -archivePath /Users/myuser/Library/Developer/Xcode/Archives/2022-01-24/myapp\ 2022-01-24\ 15.57.22.xcarchive archive | tee /Users/myuser/Library/Logs/gym/myapp-mobile.log | xcpretty
[15:57:25]: ▸     The Legacy Build System will be removed in a future release. You can configure the selected build system and this deprecation message in File > Workspace Settings.
[15:57:25]: ▸ Building Pods/DoubleConversion [Release]
[15:57:25]: ▸ Check Dependencies
[15:57:25]: ▸ Building Pods/glog [Release]
[15:57:25]: ▸ Check Dependencies
[15:57:25]: ▸ Aggregate Pods/FBLazyVector [Release]
[15:57:25]: ▸ Check Dependencies
[15:57:25]: ▸ Aggregate Pods/boost-for-react-native [Release]
[15:57:25]: ▸ Check Dependencies
[15:57:25]: ▸ Aggregate Pods/RCTRequired [Release]
[15:57:25]: ▸ Check Dependencies
[15:57:25]: ▸ Building Pods/React-Core-AccessibilityResources [Release]
[15:57:25]: ▸ Check Dependencies
[15:57:25]: ▸ Processing ResourceBundle-AccessibilityResources-React-Core-Info.plist
[15:57:25]: ▸ Copying /Users/myuser/Documents/myapp/mobile/node_modules/react-native/React/AccessibilityResources/en.lproj
[15:57:25]: ▸ ❌  error: /Users/myuser/Documents/myapp/mobile/node_modules/react-native/React/AccessibilityResources/en.lproj: No such file or directory
[15:57:25]: ▸ Aggregate Pods/React-callinvoker [Release]
[15:57:25]: ▸ Check Dependencies
[15:57:25]: ▸ Building Pods/React-jsinspector [Release]
[15:57:25]: ▸ Check Dependencies
[15:57:25]: ▸ ** ARCHIVE FAILED **
[15:57:25]: ▸ The following build commands failed:
[15:57:25]: ▸   CpResource /Users/myuser/Documents/myapp/mobile/node_modules/react-native/React/AccessibilityResources/en.lproj /Users/myuser/Library/Developer/Xcode/DerivedData/mobile-bcscdkevmsgdkxgqwricfjclvmqw/Build/Intermediates.noindex/ArchiveIntermediates/mobile/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle/en.lproj
[15:57:25]: ▸ (1 failure)

我更新了“bundle”的版本并尝试检查 Xcode 上的“Legacy Build”,但它没有带来任何东西。 我有点被这个错误困住了。

已经尝试删除 node_modules 和 运行 npm install,但没有任何改变。 我觉得这个找不到的文件必须在 npm install 命令期间构建。

好的,所以我修复了它。

我所做的是用自制软件重新安装 npm & nvm,删除 package-lock。 json 然后 运行 npm install。 由于某些原因,我没有任何名为“node_modules”的文件夹,而且我的 package-lock 不包含任何包含模块“react-native”的行,因此我将其添加回去。

现在我遇到了其他问题,但我想我必须开一张新票!