npm failed to download node-xxx-headers.tar.gz

In an intranet or poor network environment, it is usually impossible to download the node headers program. In this case, it can be installed manually. The process is as follows:

1. First download the headers package:

wget https://repo.huaweicloud.com/nodejs/v16.17.0/node-v16.17.0-headers.tar.gz

2. Set variables for npm:

npm config set tarball /tmp/node-xxx-headers.tgz

Guess you like

Origin blog.csdn.net/u013992330/article/details/130892724