npm 包存储库的 url 是什么?

What is url for npm packages repository?

我已经在 windows 上安装了 node js 和 npm 但是当我尝试使用

安装 npm 模块(包)时
command>>npm install -g xxxx(package name)

它没有安装,它要求我检查代理设置。由于我在专用网络上工作,因此可能不允许我访问从中下载 npm 包的 url。

请告诉我这些 npm 包的下载地址 url 是什么,这样我就可以请求我的网络提供商授予该站点的访问权限。

所有 npm 包实际上都是从 GitHub. However, npm resolves those GitHub dependencies via https://www.npmjs.com 下载的。

比如快递https://github.com/expressjs/express就是下载link。

npm install -g express (or without -g).

系统不知道快递包裹的GitHub位置。所以它必须先查找https://www.npmjs.com得到GitHuburl。然后它将克隆包。

NPM 包是从 https://registry.npmjs.org 下载的,除非另有配置。

您可以下载 URL 包 npm view,例如 JQuery:

npm view jquery dist.tarball

returns: https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz

您可以使用 npm set registry <new url> 更改默认注册表;这通常用于具有内部注册表镜像的大型机构或公司。