hellouniapp
hellouniapp
  • 发布:2019-05-21 22:13
  • 更新:2019-05-22 15:38
  • 阅读:4294

uni-app h5项目怎么编译发布

分类:uni-app

ide没有使用 Hbuilder,使用了idea,开发,测试都没问题。
现在要发布出去测试 微信的支付 和 html5网页认证部分。

像其他vue项目一样,在jenkins环境下配置 node,编译报错,无法正常发布。
是我build配置和命令不正确么?

jenkins上的build shell(node,npm已安装)
npm install
npm run build

报错信息:
> uni_default@0.1.0 build:h5 /var/jenkins_home/workspace/tomb_h5
> cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build

  • 开始编译当前项目至 h5 平台...
    ERROR AssertionError [ERR_ASSERTION]: missing path
    AssertionError [ERR_ASSERTION]: missing path
    at Module.require (module.js:595:3)
    at require (internal/module.js:11:18)
    at getPlatformCompiler (/var/jenkins_home/workspace/tomb_h5/node_modules/@dcloudio/uni-cli-shared/lib/platform.js:194:12)
    at webpackConfig.module.rule.use.tap.options (/var/jenkins_home/workspace/tomb_h5/node_modules/@dcloudio/vue-cli-plugin-uni/lib/h5/index.js:76:19)
    at Object.tap (/var/jenkins_home/workspace/tomb_h5/node_modules/webpack-chain/src/Use.js:14:20)
    at Object.chainWebpack (/var/jenkins_home/workspace/tomb_h5/node_modules/@dcloudio/vue-cli-plugin-uni/lib/h5/index.js:75:8)
    at api.chainWebpack.webpackConfig (/var/jenkins_home/workspace/tomb_h5/node_modules/@dcloudio/vue-cli-plugin-uni/index.js:547:21)
    at webpackChainFns.forEach.fn (/var/jenkins_home/workspace/tomb_h5/node_modules/@vue/cli-service/lib/Service.js:227:40)
    at Array.forEach (<anonymous>)
    at Service.resolveChainableWebpackConfig (/var/jenkins_home/workspace/tomb_h5/node_modules/@vue/cli-service/lib/Service.js:227:26)
    at PluginAPI.resolveChainableWebpackConfig (/var/jenkins_home/workspace/tomb_h5/node_modules/@vue/cli-service/lib/PluginAPI.js:152:25)
    at module.exports (/var/jenkins_home/workspace/tomb_h5/node_modules/@vue/cli-service/lib/commands/build/resolveAppConfig.js:2:22)
    at build (/var/jenkins_home/workspace/tomb_h5/node_modules/@dcloudio/vue-cli-plugin-uni/commands/build.js:66:88)
    at api.registerCommand (/var/jenkins_home/workspace/tomb_h5/node_modules/@dcloudio/vue-cli-plugin-uni/commands/build.js:38:11)
    at Service.run (/var/jenkins_home/workspace/tomb_h5/node_modules/@vue/cli-service/lib/Service.js:221:12)
    at Object.<anonymous> (/var/jenkins_home/workspace/tomb_h5/node_modules/@vue/cli-service/bin/vue-cli-service.js:36:9)
2019-05-21 22:13 负责人:无 分享
已邀请:
DCloud_uni-ad_HDX

DCloud_uni-ad_HDX

更新 cli 到最新版

该问题目前已经被锁定, 无法添加新回复