0

我们正在为 npm 定制人工仓库,因为我无法从我们的实验室直接访问https://registry.npmjs.org/ 。

[user1@amsai0000000054 ~]$ npm config set registry=https://artifacts.xyz.com/artifactory/npm-remote/
[user1@amsai0000000054 ~]$ npm config get registry
https://artifacts.xyz.com/artifactory/npm-remote/

[user1@amsai0000000054 ~]$ npm view angular
npm ERR! code E406
npm ERR! 406 Not Acceptable - GET https://artifacts.xyz.com/artifactory/npm-remote/angular/

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user1/.npm/_logs/2021-08-04T15_12_22_598Z-debug.log
[user1@amsai0000000054 ~]$

任何想法这里可能有什么问题?

4

1 回答 1

2

该问题似乎与正在传递的注册表 URL 有关。注册表应设置为

npm config set registry=https://artifacts.xyz.com/artifactory/api/npm/npm-remote/

请参阅以下文章以了解更多信息,

  1. NPM 注册表
  2. NPM 注册表截屏
于 2021-08-05T05:00:32.670 回答