Following the yarn official migration guide:
When I try to download yarn plugin like step 10, the command:
⚡ yarn plugin import interactive-tools
Got error:
➤ YN0001: RequestError: unable to verify the first certificate
at ClientRequest.<anonymous> (/Users/dulin/.cache/node/corepack/yarn/3.4.1/yarn.js:195:14340)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:327:22)
at ClientRequest.o.emit (/Users/dulin/.cache/node/corepack/yarn/3.4.1/yarn.js:190:90244)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
at TLSSocket.onConnectSecure (_tls_wrap.js:1497:34)
at TLSSocket.emit (events.js:315:20)
at TLSSocket._finishInit (_tls_wrap.js:932:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12)
➤ YN0000: Failed with errors in 0s 297ms
Environments:
- Yarn: 3.4.1
- corepack: 0.15.3
- node: v14.16.0
- OS: macOS 10.15.7
I have to set the http_proxy
and https_proxy
environment variables to access some sites blocked by GFW
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
If I unset them, got error:
➤ YN0001: RequestError: read ECONNRESET
at ClientRequest.<anonymous> (/Users/dulin/.cache/node/corepack/yarn/3.4.1/yarn.js:195:14340)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:327:22)
at ClientRequest.o.emit (/Users/dulin/.cache/node/corepack/yarn/3.4.1/yarn.js:190:90244)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20)
➤ YN0000: Failed with errors in 1m 21s