先删除 package-lock.json和node_modules 再安装 兼容低版本安装方式
npm install --legacy-peer-deps
启动命令
npm run serve
window 环境打包命令
npm run build:win
注意:
如果是要跑liunx 环境就需要多安装一条命令
window 环境打包命令
npm run build:liunx
"@vue/cli-service": "^4.5.9",
package.json 配置 注意 window 和liunx 配置不一样
"scripts": {
"serve": "vue-cli-service serve --mode dev",
"build": "vue-cli-service build",
"build:win": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"build:liunx": "cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build",
},
Jenkins 自动化配置
npm install --legacy-peer-deps
rm -rf ./dist/*
npm run build:liunx
标签:node,npm,vue,cli,service,liunx,build From: https://www.cnblogs.com/zxh-bug/p/18300370