在公司網路有 Proxy 或自簽憑證 (self-signed cert) 的情況下,執行 npm install 可能會遇到 SSL 認證錯誤。 以下是常見的解法: 🔧 解法一:關閉 SSL 驗證 npm config set strict-ssl false 缺點:不安全,會允許不可信憑證。 🔧 解法二:指定公司憑證檔案 npm config set cafile <path-to-cert> 讓 npm 認得公司 CA,推薦這種做法(比完全關閉驗證安全)。 🔧 解法...
kmjbpxi.hashnode.dev1 min readNo responses yet.