我急于根据使用yarn的教程创建React应用。现在,我将从头开始重新创建该应用程序,因为我对reactstrap库不满意,我想切换到react-bootstrap。
我已经重新安装了节点。但是,当我运行create-react-app时,它说使用“ yarn”代替“ 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