如何让Create-Reaction-APP用NPM代替纱线? [英] How to make create-react-app use npm instead of yarn?

查看:15
本文介绍了如何让Create-Reaction-APP用NPM代替纱线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点仓促地根据一个使用纱线的教程创建了一个Reaction应用程序。现在我要从头开始重新创建这个应用程序,因为我对reactstrap库不满意,我想切换到action-bootstrap。

我已重新安装节点。但是,当我运行Create-Reaction-app时,它会提示使用"纱线"而不是"npm",如下所示:

  yarn start
    Starts the development server.

  yarn build
    Bundles the app into static files for production.

  yarn test
    Starts the test runner.

  yarn eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd react-test
  yarn start

我喜欢使用NPM,因为它似乎使用得更广泛,基于它的例子也更多。我是坚持使用纱线,还是可以继续使用NPM?

推荐答案

您可以

1)删除yarn.lock,并运行npm i

2)运行create-react-app app --use-npm

这篇关于如何让Create-Reaction-APP用NPM代替纱线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆