当前位置:网站首页>发布模块到npm应该怎么操作?及错误问题解决方案
发布模块到npm应该怎么操作?及错误问题解决方案
2022-08-02 14:09:00 【N.S.N】
在命令行中输入npm whoami
来查询是否登录
在命令行中输入npm config ls
判断源是否为npm,千万不要是cnpm
如果未登录输入npm adduser
进行登录,根据提示进行操作,返回Logged in as fang_haixin on https://registry.npmjs.org/.
使用npm publish
发布包
如果报如下错误,则说明包名被使用了,重新定义一个name
403 Forbidden - PUT https://registry.npmjs.org/roadsign - You do not have permission to publish "roadsign". Are you logged in as the correct user?
主要原因在于我没有在邮件里面点击链接,做确认关联操作引起的
npm ERR! 403 Forbidden you must verify your email before publishing a new package
如果npm上已经有了不少和你的包名类似的包,就会出现这个问题,在package.json中修改你的包名就可以了
PUT https://registry.npmjs.org/road-sign - Package name too similar to existing packages; try renaming your package to '@fang_haixin/road-sign' and publishing with 'npm publish --access=public' instead
边栏推荐
猜你喜欢
随机推荐
FP6195耐压60V电流降压3.3V5V模块供电方案
The problem that UIWindow's makeKeyAndVisible does not call viewDidLoad of rootviewController
PyTorch(15)---模型保存和加载
神经网络的设计过程
FP7122降压恒流内置MOS耐压100V共正极阳极PWM调光方案原理图
Redis database related commands
1. What is RecyclerView
App signature in flutter
[论文阅读] ACT: An Attentive Convolutional Transformer for Efficient Text Classification
Binder机制(中篇)
STL容器自定义内存分配器
tensorflow实战之手写体识别
RN开发时遇到的问题
13.56MHZ刷卡芯片CI521兼容cv520/ci520支持A卡B卡MIFARE协议
The overlapping effect of the two surfaceviews is similar to the video and handout practice in the live effect
系统线性、时不变、因果判断
FP7126降压恒流65536级高辉无频闪调光共阳极舞台灯RGB驱动方案
【使用Pytorch实现VGG16网络模型】
想做好分布式架构?这个知识点一定要理解透彻
LLVM系列第五章:全局变量Global Variable