Is it possible to utilize yarn for retrieving packages from an Azure Artifacts repository located on-premises?

Our team utilizes on-prem Azure DevOps Server 2019 for project management.

Within the project directory, there is a .yarnrc file with the following content:

C:\xyz\tip\ui\EngagementCommon.UI [master ≡ +3 ~1 -1 !]> cat .\.yarnrc
registry "http://tfsserver.xyz.com:8080/tfs/DefaultCollection/_packaging/platform_catalog/npm/registry/"
C:\xyz\tip\ui\EngagementCommon.UI [master ≡ +3 ~1 -1 !]>

The feed is named platform_catalog: https://i.stack.imgur.com/uI6mm.png

However, when running yarn, this error is encountered:

C:\xyz\tip\ui\EngagementCommon.UI [master ≡ +3 ~1 -1 !]> yarn
yarn install v1.22.0
[1/4] Resolving packages...
error Couldn't find package "@platform/catalog" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
C:\xyz\tip\ui\EngagementCommon.UI [master ≡ +3 ~1 -1 !]> cat .\package.json|sls catalog

    "@platform/catalog": "^1.0.71",


C:\xyz\tip\ui\EngagementCommon.UI [master ≡ +3 ~1 -1 !]>

While the package can be seen in the Azure Artifacts npm feed as shown in the image, yarn fails to recognize it despite instructions in the .yarnrc file.

What could be the issue here?

EDIT 1

Using the --verbose flag provides more insight into the problem:

yarn --verbose
yarn install v1.22.0
verbose 0.1522596 Checking for configuration file "C:\\xyz\\tip\\UI\\EngagementCommon.UI\\.npmrc".
......(remaining content unchanged)......
error Couldn't find package "@platform/catalog" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

It appears that Yarn encounters a 401 error while trying to access the custom repository, but does not clearly communicate this issue, leading to confusion and usability concerns.

Answer №1

Is it possible to use yarn to fetch packages from an on-prem Azure Artifacts repository?

If you're wondering whether TFS supports using yarn to consume the artifacts, don't worry, it does.

https://i.stack.imgur.com/GH3yq.png


The error message seems to be more closely related to yarn itself.

Here are some troubleshooting methods you can try:

1) Check for any network issues, such as firewall problems, and address them.

2) Make sure that there are no different registries set in either the .yarnrc or .npmrc files.

If the issue persists after checking the above, consider adding --verbose to the command to obtain a detailed execution log and analyze it further.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

npm run build command fails to compile, even though the development version is operational

I am facing an issue with my React app that was created using create-react-app. When I try to compile a production build using npm run build, it fails and throws the following error: $ npm run build > [email protected] build C:\Users\Use ...

Redux/React project bundle

I am currently attempting to incorporate the package https://www.npmjs.com/package/is-url into my React/Redux project, but I'm unsure about how to go about importing it. Are there any other ES6-compatible installation options that you would recommend ...

Unable to incorporate external JavaScript library into Laravel project

I'm facing a challenge in incorporating the bs treeview.js library into my Laravel project and need some guidance. Thus far, I have taken the following steps: npm install --save bstreeview I included require ('bstreeview'); in resources/js/ ...

NPM has surprisingly opted for an outdated Node version

Upon running node -v on my Linux system, the output is as expected with v16.7.0 due to the binaries installed on my PATH. However, when a scripts element in my package.json calls node -v, it inexplicably prints v9.11.2. What could be causing this discrepan ...

Using command line arguments to pass parameters to package.json

"scripts": { "start": "gulp", ... }, I have a specific npm package that I'm using which requires passing parameters to the start command. Can anyone help me with how to pass these parameters in the command line? For example, is it possible ...

Do I have to utilize npm packages?

As a newcomer to Node.js, I'm diving into the world of node features while working on an Angular 2 project. One thing I've noticed is that every plugin seems to be imported from the node_modules folder. This has me wondering - is it absolutely n ...

Encountering a problem while trying to install ionic-native using npm

I encountered an error while working with npm and Angular: $ npm install ionic-native --save <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c7a5a8a6b5a3abaea9a287f6e9f7e9f7">[email protected]</a> /home/louisro/Doc ...

Guide to deploying to Elastic Beanstalk with CLI while managing Private NPM Packages

We rely on various namespaced private packages from NPM in our development process. During the deployment procedure with EB CLI (eb deploy), we encounter an issue when EB tries to execute npm i. This results in a deployment failure since EB lacks access t ...

What are the steps to implement the `serialport` library in `deno`?

After tinkering with Deno to extract readings from an Arduino, I encountered a roadblock when it came to using the serialport library correctly. Here is what I attempted: According to a post, packages from pika.dev should work. However, when trying to use ...

The installation of @grpc/grpc-js does not include all necessary dependencies

Recently, I incorporated @grpc/grpc-js into my project using the command npm i @grpc/grpc-js. Surprisingly, there are no compile time errors when I attempt to use it. However, at runtime, a series of errors arise: ./node_modules/.pnpm/@<a href="/cdn-cgi ...

"Exploring the world of Typescript with the Drawflow library

Currently, I am integrating the fantastic Drawflow library created by @Jerosoler (available at: https://github.com/jerosoler/Drawflow) into my PrimeNg project. User @BobBDE has provided typescript definitions for this library here: https://www.npmjs.com/p ...

Error encountered with npm package:<br><--- JS stacktrace ---><br>CRITICAL ERROR: table size is invalid. Memory allocation failed - JavaScript heap has

Some ReactJS projects are running smoothly, while others encounter an error that even increasing memory and clearing cache cannot fix. I am stuck in this issue. The development server is starting... <--- Last few GCs ---> [24628:0000025F59DB78F0] ...

A discrepancy in Node.js versioning caused Electron to be compiled with an incompatible version

I am currently in the process of developing an Electron application intended to operate on Ubuntu 20.xx Linux and a Raspberry Pi (which is running Raspbian with arch=armv7l). During development, I encountered the following error: ...was compiled against a ...

Error encountered on production server (Ubuntu 14.04.3 LTS) while running Grunt / npm

Encountering an error on the production server (local environment is working fine on both Windows and OSX). /home/myuser/my-app/node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js:33 }).flatten().uniq().value(); ^ TypeError: undefined is not ...

The Next.js development was hindered by a webpack issue causing the build to

Whenever I try to build my next.js app using npm run build, npm fails and crashes while trying to access the logo.png file from the public directory. This directory is where all static assets like images and icons are stored, so I'm unsure why this er ...

Installing npm packages on Kudu doesn't seem to have any effect

Earlier today, I executed npm install and the node_modules directory was created with all the necessary files. However, a few hours later, when I ran the same command with the same package.json file, there were no errors, but the node_modules directory wa ...

Can you guide me to the documentation for npm packages?

Where is the best place to access documentation for npm packages? I am in search of detailed documentation for the npm package textract. While I was able to locate the README file, I struggled to find any additional resources similar to RDoc for Ruby libr ...

Optimizing SCSS Styles for WordPress Websites

Currently, I am in the process of setting up a configuration in Visual Studio Code for a project to adhere to WordPress standards when formatting SCSS code. Despite my efforts so far, I have not encountered any errors and the code is not being formatted up ...

Initiate a PayPal payment to a specified account by entering the email address in the order

Presently, I am utilizing the paypal-rest-api for node.js and executing paypal.payment.create(). However, it necessitates that the seller possesses a business account since you are required to input a token and Id from an application on the developer' ...

Is it possible to deploy a Google App Engine service that relies on a local npm package?

I am currently navigating my way through Google Cloud and facing challenges with deploying a Google App Engine service that relies on a local sibling dependency. My project structure follows this format (using TypeScript, nestJS, React): -frontend app ...