美文网首页
MacOS上使用 react-native init 初始化项目

MacOS上使用 react-native init 初始化项目

作者: kongxx | 来源:发表于2023-09-03 22:38 被阅读0次

问题

$ react-native init AwesomeProject
...

✖ Installing Ruby Gems
error /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin21/rbconfig.rb:230: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
✖ Installing Ruby Gems
error Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/environment-setup?os=macos&platform=android and follow the React Native CLI QuickStart guide for macOS and iOS.
info Run CLI with --verbose flag for more details.

解决办法

问题是由于目录权限导致的,所以修改一下下面两个目录权限

sudo chmod go-w /usr/local/bin
sudo chmod go-w /usr/local/sbin

相关文章

网友评论

      本文标题:MacOS上使用 react-native init 初始化项目

      本文链接:https://www.haomeiwen.com/subject/gkeqvdtx.html