2019-11-05 14:55:08 -05:00
|
|
|
---
|
|
|
|
title: npm-ping
|
2020-11-01 07:54:36 +01:00
|
|
|
section: 1
|
2019-11-05 14:55:08 -05:00
|
|
|
description: Ping npm registry
|
|
|
|
---
|
|
|
|
|
|
|
|
### Synopsis
|
|
|
|
|
|
|
|
```bash
|
2022-02-24 21:41:49 +00:00
|
|
|
npm ping
|
2019-11-05 14:55:08 -05:00
|
|
|
```
|
|
|
|
|
2021-03-23 14:58:11 -04:00
|
|
|
Note: This command is unaware of workspaces.
|
|
|
|
|
2019-11-05 14:55:08 -05:00
|
|
|
### Description
|
|
|
|
|
|
|
|
Ping the configured or given npm registry and verify authentication.
|
|
|
|
If it works it will output something like:
|
|
|
|
|
|
|
|
```bash
|
2022-02-19 05:11:58 +02:00
|
|
|
npm notice PING https://registry.npmjs.org/
|
|
|
|
npm notice PONG 255ms
|
2019-11-05 14:55:08 -05:00
|
|
|
```
|
2022-02-19 05:11:58 +02:00
|
|
|
otherwise you will get an error:
|
2019-11-05 14:55:08 -05:00
|
|
|
```bash
|
2022-02-19 05:11:58 +02:00
|
|
|
npm notice PING http://foo.com/
|
|
|
|
npm ERR! code E404
|
|
|
|
npm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true
|
2019-11-05 14:55:08 -05:00
|
|
|
```
|
|
|
|
|
2021-05-20 15:54:50 -04:00
|
|
|
### Configuration
|
|
|
|
|
|
|
|
#### `registry`
|
|
|
|
|
|
|
|
* Default: "https://registry.npmjs.org/"
|
|
|
|
* Type: URL
|
|
|
|
|
|
|
|
The base URL of the npm registry.
|
|
|
|
|
2023-06-08 05:24:49 -07:00
|
|
|
|
|
|
|
|
2019-11-05 14:55:08 -05:00
|
|
|
### See Also
|
|
|
|
|
2020-12-11 18:54:56 -05:00
|
|
|
* [npm doctor](/commands/npm-doctor)
|
2020-11-01 07:54:36 +01:00
|
|
|
* [npm config](/commands/npm-config)
|
2019-11-05 14:55:08 -05:00
|
|
|
* [npmrc](/configuring-npm/npmrc)
|