当前位置:网站首页>Nodejs: detect and install the NPM module. If it is already installed, skip
Nodejs: detect and install the NPM module. If it is already installed, skip
2022-07-28 10:55:00 【shunzi2016】
CURTIME=$(date "+%Y-%m-%d %H:%M:%S")
checkAndInstall(){
# Determine whether it exists
# ps -ef|grep node |wc -l
# echo [email protected]
echo 'check and install npm modular:'$1
COUNT=$(ps -ef|grep $1 |wc -l)
if [ $COUNT -eq 1 ]; then
echo "$CURTIME $1 exist"
echo "$CURTIME $1 exist" >> /tmp/update_npm_log.txt
else
npm install $1
echo "$CURTIME $1 installing"
echo "$CURTIME $1 installed" >> /tmp/update_npm_log.txt
fi
}
n v14.16.0
npm config set registry https://registry.npm.taobao.org
cd /home/opc/web-core
# npm install nodemailer
# ----------------------------------
checkAndInstall generic-pool
echo $?边栏推荐
- CGAL compilation error
- 哈希表的相关知识点
- Yan reported an error: could not find any valid local directory for nmprivate/
- GKCircleObstacle
- The 10th Landbridge cup embedded electronic provincial competition
- Advance.ai sailing guide helps enterprises sail to Indonesia and grasp half of the Southeast Asian market
- Pyqt5 rapid development and practice 4.12 calendar and time
- PyQt5快速开发与实战 4.11 拖曳与剪贴板
- 低代码十问:一文讲透关于低代码的一切!
- 02.1.2. logic type bool
猜你喜欢

GKCylindersNoiseSource

表格数据处理软件,除了Excel还有什么?

PyQt5快速开发与实战 4.12 日历与时间

I don't know how lucky the boy who randomly typed logs is. There must be a lot of overtime

Crm+ zero code: easily realize enterprise informatization

剑指 Offer 06. 从尾到头打印链表

GKSpheresNoiseSource

19. Delete the penultimate node of the linked list

Solving the optimal solution of particle swarm optimization

10_ue4进阶_添加倒地和施法动作
随机推荐
JSON preliminary understanding
盘点:144个免费学习网站,全网最全资源合集
Picture slide effect
Batch Normlization
CGAL compilation error
GKRandom
BOM部分属性及理解
Batch Normlization
BOM part attributes and understanding
Reading these six books makes learning MySQL easier
02.1.2. logic type bool
适合中小企业的进销存软件,搞定5大难题
Tensorflow 知识点
Pyqt5 rapid development and practice 4.12 calendar and time
这里有一份超实用Excel快捷键合集(常用+八大类汇总)
GKNoiseMap
I don't know how lucky the boy who randomly typed logs is. There must be a lot of overtime
Sleeping barber problem
Blue Bridge Cup embedded Hal library systick
Characteristics and installation of non relational database mongodb