Node 14.20.0 安装[CentOS7]
cd /usr/local/src
wget https://npm.taobao.org/mirrors/node/v14.20.0/node-v14.20.0-linux-x64.tar.gz
tar -xzvf node-v14.20.0-linux-x64.tar.gz -C /usr/local
mv /usr/local/node-v14.20.0-linux-x64 /usr/local/node-v14.20.0
vim /etc/profile
export NODE_HOME=/usr/local/node-v14.20.0
export PATH=$NODE_HOME/bin:$PATH
source /etc/profile
npm install -g cnpm --registry=https://registry.npm.taobao.org
node -v
v14.20.0
npm -v
6.14.17
内网上传前端工程运行依赖缺失
cd /usr/local/src
rz datax-ui.tar.gz
tar -xzvf datax-ui.tar.gz -C /usr/local
cd /usr/local/datax-ui
npm run serve
[root@localhost datax-ui]
> datax-ui@1.0.0 serve /usr/local/datax-ui
> vue-cli-service serve
sh: vue-cli-service: command not found
切换在线主机, 准备 全局 及 局部工程 依赖包
cd /usr/local/datax-ui
npm install -g @vue/cli-service
+ @vue/cli-service@5.0.8
added 659 packages from 465 contributors in 39.695s
ls -ll /usr/local/node-v14.20.0/bin/vue-cli-service
lrwxrwxrwx. 1 1001 1001 59 Jan 18 20:43 /usr/local/node-v14.20.0/bin/vue-cli-service -> ../lib/node_modules/@vue/cli-service/bin/vue-cli-service.js
cd /usr/local/node-v14.20.0/lib/node_modules/@vue/cli-service
cd ../
tar -czf vue-cli-service.tar.gz cli-service
cd /usr/local/datax-ui
npm install
added 1885 packages from 1867 contributors in 59.648s
tar -czf node_modules.tar.gz node_modules
内网配置 全局 及 局部工程 依赖
cd /usr/local/src
rz vue-cli-service.tar.gz
rz node_modules.tar.gz
cd /usr/local/src
tar -xzvf vue-cli-service.tar.gz -C /usr/local/src
npm install -g cli-service
cd /usr/local/src
tar -xzvf node_modules.tar.gz -C /usr/local/datax-ui
cd /usr/local/datax-ui
npm run serve