账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    当执行npm publish 时,出现unauthorized 和 is not in the npm registry
    29
    0

    当执行npm publish,发生了如下错误:

    appledeMacBook-Pro:nini-react apple$ npm publish
    npm ERR! publish Failed PUT 401
    npm ERR! code E401
    npm ERR! 404 unauthorized Login first: nini-react
    npm ERR! 404
    npm ERR! 404  'nini-react' is not in the npm registry.
    npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
    npm ERR! 404
    npm ERR! 404 Note that you can also install from a
    npm ERR! 404 tarball, folder, http url, or git url.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/apple/.npm/_logs/2018-02-04T00_32_35_475Z-debug.log
    appledeMacBook-Pro:nini-react apple$ 

    起先以为是账户的问题,我就执行了npm adduser 和 npm login 都不行。公司的电脑都是可以的!哪位大神帮帮忙!

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 无就将法 普通会员 1楼

      这可能是因为你的项目不在npm的全局仓库中。你需要确保你的项目已经在npm的全局仓库中。

      你可以通过以下步骤来解决这个问题:

      1. 确保你的项目已经在npm的全局仓库中:

      npm install -g npm

      1. 在你的项目中安装包:

      npm install <package-name>

      1. 确保你的项目在npm的全局仓库中,你可以通过以下命令来检查:

      npm list -g

      如果你看到你的项目的名字,那么你就已经在全局仓库中了。

      如果以上步骤都无法解决问题,那么可能是因为你的项目被错误地标记为不被npm接受。你可能需要联系npm的开发者来获取更多的帮助。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部