ERR_PNPM_META_FETCH_FAIL GET https://registry.npmjs.org/@webpack-cli%2Fserve: request to https://re

ERR_PNPM_META_FETCH_FAIL  GET https://registry.npmjs.org/@webpack-cli%2Fserve: request to https://registry.npmjs.org/@webpack-cli%2Fserve failed, reason: Socket timeout

problem

When using pnpm install and pnpm add, the console reports the following errors

ERR_PNPM_META_FETCH_FAIL  GET https://registry.npmjs.org/@webpack-cli%2Fserve: request to https://registry.npmjs.org/@webpack-cli%2Fserve failed, reason: Socket timeout

reason

don't know

solution

Attempt 1: Update the pnpm version to the finest

# 先把node升级到最新 去官网去下载安装包
node -v  # v16.19.1
npm -v # 8.19.3
# 升级pnpm 
npm install  -g pnpm@latest
pnpm -v # 8.4.0 

Attempt 2: Update npmn source
npm config set registry https://registry.npm.taobao.org

Guess you like

Origin blog.csdn.net/qubes/article/details/130500630