美文网首页
npx create-react-app命令不成功

npx create-react-app命令不成功

作者: qwerer | 来源:发表于2019-08-10 13:17 被阅读0次

    1、查看npm的镜像源

    npm config get registry
    // 默认是:https://registry.npmjs.org/
    

    2、修改成淘宝的镜像源

    npm config set registry https://registry.npm.taobao.org
    

    3、create-react-app创建项目

    npx create-react-app todolist
    // npx comes with npm 5.2+,可以直接使用 npx create-react-app
    // 也可以使用 npm init react-app todolist         --需要 npm 6+
    

    升级npm版本

    升级npm 指令
    cnpm i -g npm to update
    

    相关文章

      网友评论

          本文标题:npx create-react-app命令不成功

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