美文网首页
React Native创建项目报错Command `yarn

React Native创建项目报错Command `yarn

作者: Loki_ | 来源:发表于2021-09-03 09:42 被阅读0次

    运行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 // 升级到稳定版本

    sudo n xx.xx // 升级到具体版本号

    相关文章

      网友评论

          本文标题:React Native创建项目报错Command `yarn

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