在公司Nexus中发布图书馆

时间:2019-11-22 10:39:14

标签: node.js npm npm-install nexus

我想在公司Nexus中发布图书馆 使用npm publish,但出现此错误:

npm notice
npm notice package: hostels-booking@1.0.0
npm notice === Tarball Contents ===
npm notice 52B  index.js
npm notice 226B package.json
npm notice === Tarball Details ===
npm notice name:          hostels-booking
npm notice version:       1.0.0
npm notice package size:  327 B
npm notice unpacked size: 278 B
npm notice shasum:        3aa58cc4a38555dc70eaf2b641ad7896fee72514
npm notice integrity:     sha512-bZYlLza6iwGFQ[...]LnNwhYDCoh5nQ==
npm notice total files:   2
npm notice
npm ERR! code E400
npm ERR! 400 Bad Request - PUT http://nexus.clouding.io:8088/nexus/content/repositories/npm-all/hostels-booking

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\sandro\npm-cache\_logs\2019-11-22T10_19_05_950Z-debug.log

Hi,
npm ERR! 400 Bad Request - PUT http://nnexus.clouding.io:8088/nexus/content/repositories/npm-all/hostels-booking

1 个答案:

答案 0 :(得分:0)

我怀疑您正在尝试发布到不支持的组存储库。您应该发布到托管存储库,因此假设托管注册表称为npm-internal,则命令应为npm publish --registry http://nexus.clouding.io:8088/nexus/content/repositories/npm-internal/或将其放入.npmrc配置文件中。如果您遵循文档(for NXRM3NXRM2),一切都应该没问题。