1.安装node,npm
wget https://nodejs.org/dist/v14.15.1/node-v14.15.1-linux-x64.tar.xz tar -xf node-v14.3.0-linux-x64.tar.xz mv node-v14.3.0-linux-x64 /opt/v14.3.0 cd /opt/v14.3.0/ cd /opt/v14.3.0/ ln -s /opt/v14.3.0/bin/node /usr/local/bin/ ln -s /opt/v14.3.0/bin/npm /usr/local/bin/ node -v npm -v
2.安装yarn
npm config set registry https://registry.npm.taobao.org/ npm install -g yarn yarn config set registry https://registry.npm.taobao.org/ yarn ls /usr/tools/node/v13.6.0/bin/yarn ln -s /usr/tools/node/v13.6.0/bin/yarn /usr/local/bin/ yarn -v
3.构建前端代码
cd shell/operation-web/ yarn npm login --registry http://npm.fed.testoa.cn yarn yarn build cd /root/shell/operation-web/dist
【从0开始】
安装node
npm config set registry https://registry.npm.taobao.org/
npm install -g yarn
yarn config set registry https://registry.npm.taobao.org/
yarn
yarn build
【正常打包流程】
yarn
yarn build