npm ERR! registry error parsing json
npm ERR! SyntaxError: Unexpected token <
npm ERR! 404 Not Found
npm ERR! The requested URL /_gh/ was not found on this server
Node v0.10.35 / npm 1.4.28 (極舊版本),Windows 環境。
/_gh/、HTML 回應 (Unexpected token <) 典型為代理攔截返回登入頁面或 404 頁面,非 JSON。npm config set registry https://registry.npmmirror.com
# 或使用 nrm 管理
npm install -g nrm
nrm use taobao
npm config set proxy https://127.0.0.1:8080
npm config set https-proxy https://127.0.0.1:8080
npm cache clean --force
npm install -g ionic
nvm (Windows 用 nvm-windows) 管理多版本。package-lock.json / yarn.lock 必須提交版控,確保構建可復現。