運行react-native init xxx報錯
報錯Command `yarn add react-native --exact` failed
解決方法:
升級Node版本,在運行就好了
sudo npm cache clean -f //清除nodejs的cache
sudo npm install -g n //使用npm安裝n模塊
npm view node versions // node所有版本
sudo n latest // 升級到最新版本
sudo n stable // 升級到穩(wěn)定版本
sudo n xx.xx // 升級到具體版本號