如何在 vue create 中选择 npm 而不是 yarn

How to choose npm over yarn in vue create

我想创建一个Vue项目,我想使用npm

在终端中,当我执行 vue create hello 时,默认情况下 yarn 用作包管理器。

那么如何直接从 npm 而不是 yarn 开始呢?

只需键入 vue create --help 即可查看 vue create 命令提供的选项。

vue create hello --packageManager npm

就是您要找的。

您可以选择 --packageManager 命令行选项或检查保存在 ~/.vuerc(用户主目录)

下的默认包管理器