Skip to content

Commit aa3cbdb

Browse files
fix(doc): add a note about troubleshooting network errors (#259)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent f539ae2 commit aa3cbdb

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,16 @@ network interaction.
217217
- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through
218218
[`node-proxy-agent`](https://github.com/TooTallNate/node-proxy-agent).
219219

220+
## Troubleshooting
221+
222+
### Networking
223+
224+
There are a wide variety of networking issues that can occur while running `corepack` commands. Things to check:
225+
226+
- Make sure your network connection is active.
227+
- Make sure the host for your request can be resolved by your DNS; try using `curl [URL]` from your shell.
228+
- Check your proxy settings (see [Environment Variables](#environment-variables)).
229+
220230
## Contributing
221231

222232
See [`CONTRIBUTING.md`](./CONTRIBUTING.md).

sources/httpUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export async function fetchUrlStream(url: string, options: RequestOptions = {})
2222
});
2323

2424
request.on(`error`, err => {
25-
reject(new Error(`Error when performing the request`));
25+
reject(new Error(`Error when performing the request to ${url}; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting`));
2626
});
2727
});
2828
}

0 commit comments

Comments
 (0)