npm

Installation
SKILL.md

npm on the Microsoft network or VPN

Use this skill when npm downloads are blocked by the Microsoft corporate network or VPN. Run commands in the affected package directory. Prefer npm ci with the existing lockfile and configured registry when access works; do not change dependency versions to solve a network failure.

This repository configures the Microsoft-approved https://packagefeedproxy.microsoft.io/npm/ registry in the root and each npm project's .npmrc, following githubnext.com. Keep the per-project settings: npm does not inherit the root .npmrc when a nested package is the project root. npm's default replace-registry-host=npmjs routes existing npmjs lockfile URLs through the configured registry without rewriting lockfiles.

Use the 1ES public npm feed

When access to npmjs is blocked, retry through the Microsoft 1ES public feed with command-scoped settings:

registry=https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/
npm ci --registry="$registry" --replace-registry-host=npmjs

--replace-registry-host=npmjs routes npmjs lockfile downloads through the selected registry without rewriting the lockfile. Private registries and lifecycle scripts that download from other hosts still need their own approved network access. Do not edit manifests, lockfile URLs, or committed npm configuration just to work around the local VPN.

To diagnose feed access, query an actual package and exact version from the lockfile. For example, substitute the project's pinned package and version in:

Installs
1
Repository
github/gh-aw
GitHub Stars
5.7K
First Seen
2 days ago