丶丶星
丶丶星
  • 发布:2021-05-07 17:37
  • 更新:2022-12-05 11:28
  • 阅读:2912

uniapp使用jenkins打包H5报错

分类:uni-app

报错信息:
$ cross-env NODE_ENV=test UNI_PLATFORM=h5 vue-cli-service uni-build
/usr/local/servers/nodefiles/uni-app-lczgu-dev/node_modules/@dcloudio/vue-cli-plugin-uni/lib/error-reporting.js:45
err = err.replace(this._UNI_INPUT_DIR_REG, 'UNI_INPUT_DIR')
^

TypeError: err.replace is not a function
at ErrorReport.report (/usr/local/servers/nodefiles/uni-app-lczgu-dev/node_modules/@dcloudio/vue-cli-plugin-uni/lib/error-reporting.js:45:15)
at report (/usr/local/servers/nodefiles/uni-app-lczgu-dev/node_modules/@dcloudio/vue-cli-plugin-uni/lib/error-reporting.js:144:24)
at process.<anonymous> (/usr/local/servers/nodefiles/uni-app-lczgu-dev/node_modules/@dcloudio/vue-cli-plugin-uni/lib/error-reporting.js:154:42)
at process.emit (events.js:315:20)
at process._fatalException (internal/process/execution.js:169:25)
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

本地打包正常,在package.js的命令上去除UNI_OUTPUT_DIR=dist,也还是报错,与之前配置无差别,没搞清楚具体原因,特在此请教

2021-05-07 17:37 负责人:无 分享
已邀请:
Item87

Item87

解决了 我今天也遇到了 之前好好的 本地能跑

jenkins不能跑> uni-pos@2.9.5 build:h5 /root/.jenkins/workspace/uni-pos

cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build

/root/.jenkins/workspace/uni-pos/node_modules/.pnpm/@dcloudio/vue-cli-plugin-uni@2.0.0/lib/error-reporting.js:45
err = err.replace(this._UNI_INPUT_DIR_REG, 'UNI_INPUT_DIR')
^

TypeError: err.replace is not a function
at ErrorReport.report (/root/.jenkins/workspace/uni-pos/node_modules/.pnpm/@dcloudio/vue-cli-plugin-uni@2.0.0/lib/error-reporting.js:45:15)
at report (/root/.jenkins/workspace/uni-pos/node_modules/.pnpm/@dcloudio/vue-cli-plugin-uni@2.0.0/lib/error-reporting.js:144:24)
at process.<anonymous> (/root/.jenkins/workspace/uni-pos/node_modules/.pnpm/@dcloudio/vue-cli-plugin-uni@2.0.0/lib/error-reporting.js:154:42)
at process.emit (events.js:400:28)
at process._fatalException (internal/process/execution.js:167:25)

  • 寒风丶

    怎么解决的能说一下嘛大佬?

    2023-03-24 18:32

要回复问题请先登录注册