diff --git a/.npmrc b/.npmrc index 8dce8ed0..1dc48ff7 100644 --- a/.npmrc +++ b/.npmrc @@ -1,23 +1,13 @@ -# 启用严格模式,确保依赖版本一致 -strict-peer-dependencies=false - -# 配置依赖安装目录(pnpm 特有,节省磁盘空间) -store-dir=~/.pnpm-store - -# 兼容 uniapp 对依赖的查找逻辑 -node-linker=hoisted - -# 忽略废弃依赖警告 -ignore-deprecations=all - -# 忽略对等依赖警告 -strict-peer-dependencies=false - -# 淘宝镜像(加速下载) +# 淘宝镜像 registry=https://registry.npmmirror.com -# 把缓存放到项目目录里,解决 Jenkins 权限问题 +# 缓存放到项目内,解决 Jenkins 权限问题 cache=.npm -# 安全关闭一些权限问题 -unsafe-perm=true \ No newline at end of file +# 权限兼容(必须) +unsafe-perm=true + +# uniapp 兼容 +strict-peer-dependencies=false +node-linker=hoisted +ignore-deprecations=true \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 4aac649a..482bca80 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,13 +22,7 @@ pipeline { ''' } } - stage('修复npm环境') { - steps { - sh ''' - npm config set prefix $WORKSPACE/.npm-global - ''' - } - } + stage('安装依赖') { steps { sh 'npm install'