最近在用 npm 安裝 socket.io 時發生了錯誤「Error: SELF_SIGNED_CERT_IN_CHAIN
npm_install_error.png

如官網發佈的訊息表示:不再支援「SELF_SIGNED_CERT_IN_CHAIN」,建議升級 npm 的版本:

npm install npm -g --ca=null

或告知 npm 不要使用 SSL

npm config set strict-ssl false