无法使用 npm 在 Mac 上安装 React Native cli

Unable to install React Native cli on Mac using npm

无法使用 npm 在 Mac 上安装 React Native cli!

我已经尝试卸载节点和 npm 并尝试命令 npm install -g react-native-cli

也试过这个,

"If you get an error like Cannot find module 'npmlog', try installing npm directly: curl -0 -L https://npmjs.org/install.sh | sudo sh"

使用sudo npm install -g react-native-cli

此外,您可以使用 Yarn!