#!/bin/bash # 临时脚本用于运行npm命令而不显示--init.module警告 # 通过重定向stderr来过滤警告信息 npm "$@" 2>&1 | grep -v "Unknown global config" | grep -v "init.module"