react-native报错

560 阅读1分钟

一、运行报错

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening reactNative.xcodeproj

解决方法参考链接

If you don't have cocoa pods installed you need to sudo gem install cocoapods

1、cd ios

2、run pod install

3、cd ..

4、delete build folder

5、run react-native run-ios

二、.jsx文件模块加载不了

.eslintrc.js中,rules规则加上"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]

三、mac环境变量每次要执行source才生效,新打开窗口又不生效

解决办法:

vim ~/.zshrc

加上这句source ~/.bash_profile