---
title: "Discussion on \"公司 Proxy 下 npm install 的 SSL 問題解法\" | Hashnode"
description: "Discussion on \"公司 Proxy 下 npm install 的 SSL 問題解法\". 在公司網路有 Proxy 或自簽憑證 (self-signed cert) 的情況下，執行 npm install 可能會遇到 SSL 認證錯誤。\n以下是常見的解法：\n\n🔧 解法一：關閉 SSL 驗證\nnpm config set strict-ssl false\n\n\n缺點：不安全，會允許不可信憑證。\n\n\n🔧 解法二：指定公司憑證檔案\nnpm config set cafile <path-to-cert>\n\n\n讓 npm 認得公司 CA，推薦這種做法（比完全關閉驗證安全）。\n\n\n🔧 解法..."
url: "https://hashnode.com/posts/proxy-npm-install-ssl/68a2936ac19bfa5d4d8eb838"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [公司 Proxy 下 npm install 的 SSL 問題解法](https://kmjbpxi.hashnode.dev/proxy-npm-install-ssl?utm_source=hashnode&utm_medium=feed)

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

Aug 18, 2025 · 1 min read · kmjbpxi.hashnode.dev  
Read the article

-   [#npm](https://hashnode.com/tag/npm)
-   [#proxy](https://hashnode.com/tag/proxy)

## Written by

[KM W](https://hashnode.com/@km0818)

@km0818

  
[View profile](https://hashnode.com/@km0818)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
