尝试将新程序包发布到NPM时获取404 [英] Getting 404 when attempting to publish new package to NPM

查看:767
本文介绍了尝试将新程序包发布到NPM时获取404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚创建了一个新程序包: https://github.com/supericium/pli

I just created a new package: https://github.com/supericium/pli

我现在正试图像这样第一次将其发布到NPM:

I'm now trying to publish it to NPM for the first time like this:

    ole@MKI:~/Sandbox/pli$ npm publish  --access public
    npm ERR! publish Failed PUT 404
    npm ERR! Linux 3.13.0-93-generic
    npm ERR! argv "/home/ole/.nvm/versions/v6.4.0/bin/node" "/home/ole/.nvm/versions/v6.4.0/bin/npm" "publish" "--access" "public"
    npm ERR! node v6.4.0
    npm ERR! npm  v3.10.3
    npm ERR! code E404

    npm ERR! 404 Not found : @supericium/pli
    npm ERR! 404 
    npm ERR! 404  '@supericium/pli' 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! Please include the following file with any support request:
    npm ERR!     /home/ole/Sandbox/pli/npm-debug.log

我尝试同时更新NodeJS和NPM,以确保我具有最新版本:

I tried updating both NodeJS and NPM to make sure that I have the latest version, which are:

ole@MKI:~/Sandbox/pli$ node --version
v6.4.0
ole@MKI:~/Sandbox/pli$ npm --version
3.10.3

有想法吗?

TIA, 奥莱(Ole)

TIA, Ole

推荐答案

您需要在注册表中将"supericium"(npm adduser)注册为用户名,并登录后才能在该范围内发布.

You need to have registered "supericium" (npm adduser) as a username at the registry and be logged in to publish under that scope.

  • https://docs.npmjs.com/getting-started/publishing-npm-packages
  • https://docs.npmjs.com/getting-started/scoped-packages

这篇关于尝试将新程序包发布到NPM时获取404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆