Jac*_*ble 35 npm reactjs yarnpkg
我有点急于根据使用 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
Run Code Online (Sandbox Code Playgroud)
我想使用 npm,因为它似乎使用更广泛,并且有更多基于它的示例。我是被纱线卡住了,还是可以继续使用 npm?
wen*_*jun 82
你可以
1)删除yarn.lock,并运行npm i,
或者
2)运行 create-react-app app --use-npm
Saj*_*man 11
1 \xe2\x87\xa2 如果已安装,create-react-app则使用:
create-react-app --use-npm\nRun Code Online (Sandbox Code Playgroud)\n2 \xe2\x87\xa2 如果您使用npx命令,则使用:
npx create-react-app --use-npm\nRun Code Online (Sandbox Code Playgroud)\n3 \xe2\x87\xa2 对于现有yarn应用程序,删除该yarn.lock文件并运行:
npm i\nRun Code Online (Sandbox Code Playgroud)\n或者
\nnpm install\nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
12144 次 |
| 最近记录: |