# 判断是否安装了node if ! type node >/dev/null 2>&1; then echo 'node 未安装'; else echo 'node 已安装'; fi # 判断是否安装了npm if ! type npm >/dev