← 返回命令列表

Linux command

npm-ping 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Ping default npm registry

npm ping

Ping custom registry

npm ping --registry [https://registry.example.com]

说明

npm ping pings the configured or specified npm registry and verifies authentication if credentials are configured. It outputs the registry URL and response time on success, or an error on failure. Useful for diagnosing registry connectivity issues, verifying custom registry configurations, and troubleshooting npm authentication.

参数

--registry _url_
Registry URL to ping (default: https://registry.npmjs.org).

FAQ

What is the npm-ping command used for?

npm ping pings the configured or specified npm registry and verifies authentication if credentials are configured. It outputs the registry URL and response time on success, or an error on failure. Useful for diagnosing registry connectivity issues, verifying custom registry configurations, and troubleshooting npm authentication.

How do I run a basic npm-ping example?

Run `npm ping` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --registry _url_ do in npm-ping?

Registry URL to ping (default: https://registry.npmjs.org).