How to use registry scopes with Yarn 2.0 and Azure Artifacts
Asked Answered
V

1

7

I would like to use https://registry.yarnpkg.com as my package registry for all packages except 1 that I am hosting on Azure Artifacts.

I have the following .yarnrc.yml file

yarnPath: ".yarn/releases/yarn-berry.js"    
npmScopese:
      my-scope:
        npmRegistryServer: 'https://pkgs.dev.azure.com/<my-org>/_packaging/<my-feed>/npm/registry/'
        npmAlwaysAuth: true
        npmAuthIdent: 'my-auth-stuff'

then in the console I run yarn add @my-scope/[email protected]

I get the following error @my-scope/my-package@npm:1.0.0: Response code 404 (Not Found)

The following returns a 200 response

curl GET 'https://pkgs.dev.azure.com/<my-org>/_packaging/<my-feed>/npm/registry/<my-package>' --header 'Authorization: <my-auth>'

Not sure if am missing something. Any help would be appreciated.

Vulgar answered 8/7, 2020 at 20:31 Comment(0)
V
3

For anybody who comes across this I solved it by changed my package name to @my-scope/my-package in artifacts.

Vulgar answered 8/7, 2020 at 21:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.