简体   繁体   English

verdaccio 发布新的 package

[英]verdaccio publish new package

OS OpenSuse 15.2 I have trouble with publihing new packages to local npm proxy OS OpenSuse 15.2 我无法将新包发布到本地 npm 代理

Verdaccio version 5.1.0 Verdaccio 版本 5.1.0

  1. I have installed verdaccio from npm我已经从 npm 安装了 verdaccio

  2. Added user verdaccio: id verdaccio uid=1001(verdaccio) gid=100(users) группы=100(users)添加用户 verdaccio: id verdaccio uid=1001(verdaccio) gid=100(users) группы=100(users)

  3. Added to config storage path params:添加到配置存储路径参数:

     storage: /npm/storage # path to a directory with plugins to include plugins: /npm/plugins
  4. Run it运行

     warn --- config file - /home/verdaccio/.config/verdaccio/config.yaml warn --- Plugin successfully loaded: verdaccio-htpasswd warn --- Plugin successfully loaded: verdaccio-audit warn --- http address - http://172.16.4.76:1234/ - verdaccio/5.1.0
  5. Add npm user and set npm manager to register local proxy添加npm用户并设置npm管理器注册本地代理

    Username: verdaccio Password: Email: (this IS public) Logged in as verdaccio on http://172.16.4.76:1234/.

Then I cd to js module and do:然后我 cd 到 js 模块并执行以下操作:

```# npm publish --registry http://172.16.4.76:1234/

Got an error: (npm )出现错误:(npm)

```npm notice 
npm notice 📦  easyrabbit@1.0.0
npm notice === Tarball Contents === 
npm notice 418B  package.json        
npm notice 1B    README.md           
npm notice 1.5kB class.easyrabbit.mjs
npm notice === Tarball Details === 
npm notice name:          easyrabbit                              
npm notice version:       1.0.0                                   
npm notice package size:  938 B                                   
npm notice unpacked size: 1.9 kB                                  
npm notice shasum:        9f758fe3b7076efb131482242bccab92e6d12218
npm notice integrity:     sha512-rFP+zMQlRFZhB[...]MQmtD0g1Y6u9Q==
npm notice total files:   3                                       
npm notice 
npm ERR! code E404
npm ERR! 404 Not Found - PUT http://172.16.4.76:1234/easyrabbit - no such package available
npm ERR! 404 
npm ERR! 404  'easyrabbit@1.0.0' 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!     /root/.npm/_logs/2021-06-05T11_27_47_111Z-debug.log

On verdaccio side:在 verdaccio 方面:

``` 
   http --- 172.16.4.76 requested 'GET /npm'
   (node:12088) [DEP0106] DeprecationWarning: crypto.createDecipher is deprecated.
   info --- auth/allow_action: access granted to: undefined
   info --- allowed access for npm
   info --- making request: 'GET https://registry.npmjs.org/npm'
   http --- 200, req: 'GET https://registry.npmjs.org/npm' (streaming)
   http --- 200, req: 'GET https://registry.npmjs.org/npm', bytes: 0/15211570
   http --- 200, user: verdaccio(172.16.4.76), req: 'GET /npm', bytes: 0/4171881
   http --- 172.16.4.76 requested 'GET /npm'
   info --- auth/allow_action: access granted to: undefined
   info --- allowed access for npm
   http --- 172.16.4.76 requested 'GET /-/whoami'
   http --- 304, user: verdaccio(172.16.4.76), req: 'GET /-/whoami', bytes: 0/0
   http --- 200, user: verdaccio(172.16.4.76), req: 'GET /npm', bytes: 0/4171881
   http --- 172.16.4.76 requested 'POST /-/v1/login'
   http --- 404, user: verdaccio(172.16.4.76), req: 'POST /-/v1/login', bytes: 18/150
   http --- 172.16.4.76 requested 'PUT /-/user/org.couchdb.user:verdaccio'
   http --- 201, user: verdaccio(172.16.4.76), req: 'PUT 
   /-/user/org.couchdb.user:verdaccio', bytes: 134/110
   http --- 192.168.3.105 requested 'GET /'
   http --- 304, user: null(192.168.3.105), req: 'GET /', bytes: 0/0
   http --- 192.168.3.105 requested 'GET /-/verdaccio/packages'
   http --- 304, user: null(192.168.3.105), req: 'GET /-/verdaccio/packages', bytes: 0/0
   http --- 172.16.4.76 requested 'PUT /easyrabbit'
   info --- auth/allow_action: access granted to: undefined
   info --- verdaccio is allowed publish for easyrabbit
   info --- auth/allow_action: access granted to: undefined
   info --- verdaccio allowed unpublish for easyrabbit
   http --- 404, user: verdaccio(172.16.4.76), req: 'PUT /easyrabbit', error: no such 
   package available

What do I wrong?我错了什么?

I've had this error two days ago.两天前我遇到了这个错误。 I tried everything, even updated to verdaccio 5.1.我尝试了一切,甚至更新到 verdaccio 5.1。

My solution: in my package.json, there was a field "deprecated" set to false.我的解决方案:在我的 package.json 中,有一个字段“已弃用”设置为 false。 I don't know how this got there, but once I removed it, I could publish again.我不知道它是如何到达那里的,但是一旦我将其删除,我就可以再次发布。 Check your package.json and remove some fields you do not need, maybe you'll get lucky.检查您的 package.json 并删除一些您不需要的字段,也许您会很幸运。 Verdaccio error messages on the server do not mention anything about a malformed package.json.服务器上的 Verdaccio 错误消息未提及有关格式错误的 package.json 的任何内容。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我不能将此特定的 package 发布到 Verdaccio 托管的私有 NPM 注册表? - Why can't I publish this specific package to a private NPM registry hosted by Verdaccio? Verdaccio 在 package 信息中添加维护者名称 - Verdaccio add maintainer name in package info Verdaccio:如何使用正确的凭据从 Github 操作发布到自定义服务器? - Verdaccio: how to publish to custom server from Github Actions with proper credentials? 尝试将新的 package 发布到 NPM 时获取 404 - Getting 404 when attempting to publish new package to NPM 将包的 npm 发布到 AWS CodeArtifact 存储库失败,并出现错误“提供的包已配置为阻止新版本发布。” - npm publish for a package to AWS CodeArtifact repo fails with error "The provided package is configured to block new version publishes." NPM无法发布E400新软件包版本必须与{shasum,tarball}一起发行 - NPM Can't Publish E400 New package version must have dist with {shasum, tarball} 获取 npm 错误 npm ERR! 尝试将新的 npm 包版本发布到 npm 时,404 '@my-package@2.0.0' 不在此注册表中 - Get npm error npm ERR! 404 '@my-package@2.0.0' is not in this registry when try to publish new npm package version to npm 尝试发布 npm package 时出错 - Errors trying to publish npm package 如何在不泄露代码的情况下将包发布到 npm - How to publish package to npm without revealing the code 无法从 Github 发布 npm 包? - Unable to publish npm package from Github?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM