我想把这个留给未来的我。
发生此错误时,请确保检查代码:
/bin/sh -c /Users/jvilchis/Library/Developer/Xcode/DerivedData/greatreact-dkbvpjswqresoybydivatvcctnaa/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404279F232A.sh
nvm is not compatible with the "npm_config_prefix" environment variable: currently set to "/usr/local"
Run `unset npm_config_prefix` to unset it.
Command PhaseScriptExecution failed with a nonzero exit code
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the greatreact editor. (in target 'greatreact' from project 'greatreact')
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User] Generate Specs /Users/jvilchis/Library/Developer/Xcode/DerivedData/greatreact-dkbvpjswqresoybydivatvcctnaa/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404279F232A.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)
info Run CLI with --verbose flag for more details.
检查模拟器版本,构建一个模拟器来部署的构建。
大多数时候,当我使用不同的iOS模拟器时,会出现这些消息。我注意到,当我在模拟器iPhone 11 Pro上运行代码时,大多数时间都能正常工作。当我部署到iPhone 13 iOS 15.4时,它会崩溃。此外,我一直在删除node_modules文件夹,删除package-lock.json并运行npm install
然后通过以下方式安装吊舱:cd ios pods install
之后,我在xcode中打开项目并运行应用程序。
这是给未来的我的,但请使用这些笔记使你的应用程序工作。我计划用这个来说明我在应用程序构建中遇到的大多数问题。