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的值换掉。如果还出现上述错误就是还是重名的,继续换!

  • 相关阅读:
    linux:shell:tree
    html5,css3
    asp.net web forms page life cycle
    Unobtrusive Javascript
    Multitier architecture
    C#接口的显示实现和隐式实现
    Modernizr
    android w700
    debian e42 wifi
    mstest run dll
  • 原文地址:https://www.cnblogs.com/chengzp/p/7757839.html
Copyright © 2011-2022 走看看