zoukankan      html  css  js  c++  java
  • 发布npm时遇到的两个小问题,解决方法


    1、出现这个错误 no_perms Private mode enable, only admin can publish this module

    错误输出内容

    npm ERR! publish Failed PUT 403
    npm ERR! code E403
    npm ERR! no_perms Private mode enable, only admin can publish this module:
    出现原因:使用的是淘宝源cnpm,登陆到的是cnpm

    解决方法:切换到npmjs的网址,代码如下

    npm config set registry http://registry.npmjs.org/


    2、You do not have permission to publish "npmtest". Are you logged in as the correct user? 

    错误输出内容

    npm ERR! publish Failed PUT 403
    npm ERR! code E403
    npm ERR! You do not have permission to publish "npmtest". Are you logged in as the correct user? :
    出现原因:所要publish的包的name和npmjs网上已经发布的包的名字重复,所以收你没有权限发布这个名字的包。(简单解释就是你想要的名字被别人抢先注册了)

    解决方法:找到package.json文件,把name的值换掉。如果还出现上述错误就是还是重名的,继续换!

  • 相关阅读:
    字体
    当前li的同级且不包含当前li
    溢出用省略号显示
    .NET Core中使用Cookie步骤
    .NET Core中使用Session步骤
    asp.net core 读取配置
    Asp.Net Core run on Ubuntu
    .net core中使用GB2312编码
    ubuntu mysql 安装
    samba的安装
  • 原文地址:https://www.cnblogs.com/chengzp/p/7757839.html
Copyright © 2011-2022 走看看