ARTIFACTORY: How to proxy https://buf.build/gen/npm/v1 by npm repository

Products
Frog_Artifactory
Content Type
User_Guide
AuthorFullName__c
Ruilin Fan
articleNumber
000007065
FirstPublishedDate
2026-07-16T13:28:39Z
lastModifiedDate
2026-07-16

ARTIFACTORY: How to proxy https://buf.build/gen/npm/v1 by npm repository

Introduction 
There is a npm website https://buf.build/gen/npm/v1 which can be used as a source to install packages, but to directly proxy it by npm remote repository does not work with 404 error.
Root Cause and Resolution 
Due to npm installing packages from https://buf.build/gen/npm/v1 will also install from https://registry.npmjs.org, which needs to use two npm remote repositories to proxy separately.
Use npm repository to proxy:
  1. Create npm-remote to proxy https://registry.npmjs.org
  2. Create npm-remote-buf to proxy https://buf.build/gen/npm/v1 (It must check “Bypass Header Request” at Advanced page due to the site is not supported about Head request);
  3. Then configure client to connect the two above remote repositories;
And  .npmrc like:
@buf:registry=https://demo.com/artifactory/api/npm/npm-remote-buf/
//demo.com/artifactory/api/npm/npm-remote-buf/:_authToken=<token>
registry=https://demo.com/artifactory/api/npm/npm-remote/
//demo.com/artifactory/api/npm/npm-remote/:_authToken=<token>


Conclusion
After that, ‘npm install <package> --verbose’ will install from Artifactory successfully.