【问题标题】:Azure Artifacts is returning 404 for some of the public npm packagesAzure Artifacts 为某些公共 npm 包返回 404
【发布时间】:2020-03-22 23:52:18
【问题描述】:

我正在尝试将 Azure Artifacts 配置为使用 npmjs.org 作为上游源的所有私有和公共包的单一来源。一些公共 npm 包从 Azure Artifacts 返回 404 Not Found,但直接从 npmjs 加载工作正常。

公共包的 npm install 失败示例

C:\git-repos\alinta\FrontEnd.Sitecore>npm i react-app-polyfill
npm ERR! code E404
npm ERR! 404 Not Found - GET https://pkgs.dev.azure.com/AlintaDigital/_packaging/AlintaDigital/npm/registry/react-app-polyfill - NotFound
npm ERR! 404
npm ERR! 404  'react-app-polyfill@^1.0.1' 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!     C:\Users\jawan\AppData\Roaming\npm-cache\_logs\2020-03-22T23_17_20_270Z-debug.log

其他一些经常无法安装的公共 npm 包是

  • react
  • isomorphic-fetch
  • cleave.js
  • history
  • object-assign

虽然其他一些公共包可用于 Azure Artifacts

上游来源设置已配置如下

【问题讨论】:

    标签: azure npm azure-devops npm-install azure-artifacts


    【解决方案1】:

    看起来这是一个权限问题。您能否检查以确保您(和其他试图从上游资源中提取的开发人员)具有协作者(或更好的)权限?

    来源:https://docs.microsoft.com/en-us/azure/devops/artifacts/feeds/feed-permissions?view=azure-devops

    【讨论】:

    • 那就对了。将我的帐户权限从 Reader 转移到 Collaborator 为我解决了这个问题。非常感谢,丹?
    【解决方案2】:

    就我而言,我必须允许项目范围的构建。我们的项目集合构建服务已经被设置为贡献者。但是在权限下的导航菜单中有一个省略号,点击它时,我可以选择Allow project-scoped builds

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-06-14
      • 1970-01-01
      • 2022-07-19
      • 1970-01-01
      • 2015-06-12
      • 1970-01-01
      • 2021-05-18
      • 2016-04-01
      相关资源
      最近更新 更多