Yarn报错:error Couldn‘t publish package: “https://registry。。。 Are you logged in as the correct user?“

时间:2024-05-21 21:44:19

Yarn报错:error Couldn't publish package: "https://registry.yarnpkg.com/generator-vue: You do not have permission to publish \"generator-vue\". Are you logged in as the correct user?"

Yarn报错:error Couldn‘t publish package: “https://registry。。。 Are you logged in as the correct user?“

原因分析

这是由于你要发布的模块名,已经被别人抢先发布了,被占用了。因此,需要修改你的模块的名称。

解决方案

在你的项目根目录中,package.json 中的name 属性,修改位置如图所示:
Yarn报错:error Couldn‘t publish package: “https://registry。。。 Are you logged in as the correct user?“