使用yarn安装包时,发生报错:
error C:\xxxxx\node_modules\esbuild: Command failed.
Exit code: 1
Arguments:
Output:
Trying to install "esbuild-windows-64" using npm
Failed to install "esbuild-windows-64" using npm: Command failed: npm install --loglevel=error --prefer-offline --no-audit --progress=false esbuild-windows-64@0.6.34
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to registry.npm.taobao.org/esbuild-win… failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2025-01-08T03_21_14_836Z-debug.log
只需要:
npm i esbuild-windows-64
,安装成功后,继续yarn
,就可以成功安装