Ole*_*Ole 6 node.js npm npm-publish
我刚刚创建了一个新程序包:https : //github.com/supericium/pli
我现在正尝试将其首次发布到NPM,如下所示:
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
Run Code Online (Sandbox Code Playgroud)
我尝试同时更新NodeJS和NPM以确保我具有最新版本,它们是:
ole@MKI:~/Sandbox/pli$ node --version
v6.4.0
ole@MKI:~/Sandbox/pli$ npm --version
3.10.3
Run Code Online (Sandbox Code Playgroud)
有什么想法吗?
TIA,奥莱
小智 6
就我而言,我收到此消息是因为我正在使用的令牌已被撤销。我通过以下方式修复了它:
export NPM_TOKEN="<token>"在我的 .zshrc (或 .bashrc)文件中source ~/.zshrc终端。您需要npm adduser在注册表中将“ supericium”()注册为用户名,并登录后才能在该范围内发布。
这个错误在两种情况下出现在我身上:
当我没有登录时。您可以通过 来查看您是否已登录npm whoami,如果未登录则通过 来查看您是否已登录npm login。
当我无权发布到存储库时。在这种情况下,请确保您已添加到拥有该存储库的组织中。
| 归档时间: |
|
| 查看次数: |
9407 次 |
| 最近记录: |