即使安装了纱线,NPX也不使用纱线

发布于 2025-01-28 00:09:40 字数 218 浏览 2 评论 0原文

我在Mac OS上安装了节点JS和纱线。纱线和NPM工作。但是,当我尝试使用以下命令React应用创建创建应用程序时,将使用NPM创建。

如何使YARN成为NPX的默认软件包管理器?

NPX CREATE-REACT-APP

请帮助我。

在我的Windows PC上,NPX可与纱线一起使用。在Mac中安装了YARN,NPX使用NPM

I installed node js and yarn on mac os. Both yarn and npm work. But when I try to create a creat app using the following command react app is created with npm.

How could I make yarn the default package manager for npx?

npx create-react-app

Kindly help me with this.

On my windows PC npx works with yarn. In mac though yarn is installed npx uses npm

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不一样的天空 2025-02-04 00:09:40

NPX将始终使用NPM。这不能更改。

使用YARN,您可以通过YARN创建React-App My-App来启动一个新项目。

npx will always use npm. This cannot be changed.

With yarn you may start a new project by yarn create react-app my-app instead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文