http://eux.baidu.com/blog/fe/npm%20aduit%E4%BA%8C%E4%B8%89%E4%BA%8B
# 掃描項目漏洞把不安全的依賴項自動更新到兼容性版本 npm audit fix # 在不修改 node_modules 的情況下執行 audit fix,仍然會更改 pkglock npm audit fix --package-lock-only # 跳過更新 devDependencies npm audit fix --only=prod # 強制執行 audit fix 安裝最新的依賴項(toplevel) npm audit fix --force # 單純的獲取 audit fix 會做的事,並以 json 格式輸出。 npm audit fix --dry-run --json # 獲取詳情 npm audit # 以 JSON 格式打印報告 npm audit --json