问题是babel编译后 没有这个helper函数babel可以确认是用的 ci 的还是自己的。因为看提示 是 ../@babel的路径,看起来是你们自己的 babel配置如果是ci的。可以看看ci文档的 编译设置 的 https://www.npmjs.com/package/miniprogram-ci配置,以及https://developers.weixin.qq.com/miniprogram/dev/devtools/codecompile.html然后使用ci.getCompiledResult看看最终的编译结果来定位具体的问题。
miniprogram-ci升级到2.1.8后,上传包成功后,真机扫体验版出现白屏?从1.0.98版本升级到最新2.1.8版本。 项目构建产物是没有变化的,只是升级了ci版本。 miniprogram-ci的setting { es6: true, es7: true, minify: true } 从onProgressUpdate来看,构建产物是上传成功了 [图片] 白屏错误信息: Error during evaluaing file app.js can not find module: require args is [图片] 请大佬们帮看下啥问题?
12-03看提示是 babel提示.map过大的报错。 去掉.map文件,或是把es7:true去掉。
miniprogram-ci 上传的unity导出的小游戏,卡在进度,在微信开发者工具上传没有问题[图片][图片]
09-031.9.17 报错在你的node_modules的chalk里面 我猜测是版本有问题 可以试试chalk 4.1.2。 2.0.8 就是正常的检查报错。相对1.9.17检查变得严格了。可以确认一下miniprogramRoot下面的相对路径是不是错了 miniprogram/app.json: ["pages"][0] could not find the corresponding file: "pages/index/index.js"
miniprogram-ci preview 上传代码报错?测试了一下npm包的版本均有问题。 miniprogram-ci@2.0.6 miniprogram-ci@2.0.4 miniprogram-ci@1.9.16 miniprogram-ci@1.9.8 配置如下: miniprogram-ci preview \ -v false \ --pp ./dist \ --pkp ./private-key.txt \ --enable-es6 true \ --enable-es7 true \ --enable-minify true \ --enable-allowIgnoreUnusedFiles true \ --enable-autoprefixwxss true \ --uv ***** \ --ud ***** \ --appid ***** \ -r 1 上周五还能用,今天周一我们公司所有的小程序CI全部异常。 项目使用 ts ci 版本号 1.9.17 [图片] 报错: WARNING: 61 repetitive deprecation warnings omitted. { type: 'SummerError', message: "TypeError: Cannot read properties of undefined (reading 'close')", stack: "TypeError: Cannot read properties of undefined (reading 'close')\n" + ' at Object.<anonymous> (/usr/local/bin/global/5/.pnpm/node_modules/chalk/index.js:72:75)\n' + ' at Module._compile (node:internal/modules/cjs/loader:1159:14)\n' + ' at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)\n' + ' at Module.load (node:internal/modules/cjs/loader:1037:32)\n' + ' at Module._load (node:internal/modules/cjs/loader:878:12)\n' + ' at Module.require (node:internal/modules/cjs/loader:1061:19)\n' + ' at require (node:internal/modules/cjs/helpers:103:18)\n' + ' at Object.<anonymous> (/usr/local/bin/global/5/.pnpm/miniprogram-ci@1.9.17_eslint@8.57.0/node_modules/@babel/highlight/lib/index.js:10:15)\n' + ' at Module._compile (node:internal/modules/cjs/loader:1159:14)\n' + ' at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)', code: 10046, path: 'miniprogram/api/account.ts', plugin: 'summer-typescript', hook: 'load' } 切换至最新版本 ci: 2.0.8 [图片] 报错: child process stderr: getAppJSON error Error: miniprogram/app.json: ["pages"][0] could not find the corresponding file: "pages/index/index.js" at throwError (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/utils/common.js:1:1102) at checkPageExist (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/app/checkAppFields.js:1:1534) at checkMainPkgPages (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/app/checkAppFields.js:1:6047) at checkAppJSON (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/app/appJSON.js:1:2372) at /usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/app/appJSON.js:1:4242 at i.scheduler (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/reactiveCache.js:1:1702) at reactiveEffect (/usr/local/bin/global/5/.pnpm/@vue+reactivity@3.0.5/node_modules/@vue/reactivity/dist/reactivity.cjs.js:46:24) at effect (/usr/local/bin/global/5/.pnpm/@vue+reactivity@3.0.5/node_modules/@vue/reactivity/dist/reactivity.cjs.js:21:9) at ReactiveJSONCompiler.registerOrGet (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/reactiveCache.js:1:1682) at /usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/reactiveCache.js:1:3413 { code: 10005, path: 'miniprogram/app.json' } CustomError: miniprogram/app.json: ["pages"][0] could not find the corresponding file: "pages/index/index.js" at throwError (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/utils/common.js:1:1102) at checkPageExist (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/app/checkAppFields.js:1:1534) at checkMainPkgPages (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/app/checkAppFields.js:1:6047) at checkAppJSON (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/app/appJSON.js:1:2372) at /usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/app/appJSON.js:1:4242 at i.scheduler (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/reactiveCache.js:1:1702) at reactiveEffect (/usr/local/bin/global/5/.pnpm/@vue+reactivity@3.0.5/node_modules/@vue/reactivity/dist/reactivity.cjs.js:46:24) at effect (/usr/local/bin/global/5/.pnpm/@vue+reactivity@3.0.5/node_modules/@vue/reactivity/dist/reactivity.cjs.js:21:9) at ReactiveJSONCompiler.registerOrGet (/usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/reactiveCache.js:1:1682) at /usr/local/bin/global/5/.pnpm/miniprogram-ci@2.0.8_eslint@8.57.0/node_modules/miniprogram-ci/dist/modules/corecompiler/original/json/reactiveCache.js:1:3413 { code: 10005, path: 'miniprogram/app.json' }
07-31babel的node_modules依赖发版导致的。 2.0.8 1.9.17 锁定了babel的子版本。PS:清除本地的node_modules和lock文件
小程序miniprogram-ci 发版报错?报错code 10032,抛错path.requeueComputedKeyAndDecorators。 npx miniprogram-ci@1.9.15执行上传,配置了enable-es7 true就会报错,不配置不会报错,但是引用的第三方插件有使用大量的可选链等语法,不配置es7加强会报错的,配置了只能手动发版本 [图片]
07-29babel的node_modules依赖发版导致的。 2.0.8 1.9.17 锁定了babel的子版本。PS:清除本地的node_modules和lock文件
unknown file: path.requeueComputedKeyAndDecoratorsminiprogram-ci preview 上传代码报错。 报错1: unknown file: path.requeueComputedKeyAndDecorators is not a function at enhance (/usr/local/lib/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/plugins/enhance.js:1:1579) at doTransform (/usr/local/lib/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/plugins/enhance.js:1:1827) at Object.runSummerPluginHook (/usr/local/lib/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/worker.js:1:1225) { code: 10045, path: 'app/components/block-item/index.js' 报错2: { type: 'SummerError', message: 'TypeError: _traverse.visitors.environmentVisitor is not a function', stack: 'TypeError: _traverse.visitors.environmentVisitor is not a function\n' + ' at Object.<anonymous> (/usr/local/bin/global/5/.pnpm/node_modules/@babel/helper-replace-supers/lib/index.js:22:51)\n' + ' at Module._compile (node:internal/modules/cjs/loader:1159:14)\n' + ' at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)\n' + code: 10046, path: 'miniprogram/api/account.ts', plugin: 'summer-typescript', hook: 'load' } 测试了一下npm包的版本均有问题。 miniprogram-ci@2.0.6 miniprogram-ci@2.0.4 miniprogram-ci@1.9.16 miniprogram-ci@1.9.8 配置如下: miniprogram-ci preview \ -v false \ --pp ./dist \ --pkp ./private-key.txt \ --enable-es6 true \ --enable-es7 true \ --enable-minify true \ --enable-allowIgnoreUnusedFiles true \ --enable-autoprefixwxss true \ --uv ***** \ --ud ***** \ --appid ***** \ -r 1 上周五还能用,今天周一我们公司所有的小程序CI全部异常。
07-29Babel的版本虽然锁定了,但是它的依赖更新了版本。导致了问题。 旧版本的ci 可以先用1.9.17试试 2.0.8 也修复了
unknown file path.requeueComputedKeyAndDecorators?unknown file: path.requeueComputedKeyAndDecorators is not a function at throwError (/var/lib/.nvm/versions/node/v12.0.0/lib/node_modules/miniprogram-ci/dist/utils/common.js:2:1095) at m (/var/lib/.nvm/versions/node/v12.0.0/lib/node_modules/miniprogram-ci/dist/core/compile/handler/js.js:2:2611) at processTicksAndRejections (internal/process/task_queues.js:88:5) at async compileJS (/var/lib/.nvm/versions/node/v12.0.0/lib/node_modules/miniprogram-ci/dist/core/compile/handler/js.js:2:2871) at async Promise.all (index 1) at async compileJSFiles (/var/lib/.nvm/versions/node/v12.0.0/lib/node_modules/miniprogram-ci/dist/core/compile/common.js:2:2708) at async compile (/var/lib/.nvm/versions/node/v12.0.0/lib/node_modules/miniprogram-ci/dist/core/compile/mini_program.js:2:2151) at async innerUpload (/var/lib/.nvm/versions/node/v12.0.0/lib/node_modules/miniprogram-ci/dist/ci/upload.js:2:1968) at async upload (/var/lib/.nvm/versions/node/v12.0.0/lib/node_modules/miniprogram-ci/dist/ci/upload.js:2:1014) at async Proxy.<anonymous> (/var/lib/.nvm/versions/node/v12.0.0/lib/node_modules/miniprogram-ci/dist/utils/report.js:2:1403) { code: 10032, path: 'components/xxx.js' 上午上传小程序代码还是好好的,下午就全都不行了。是不是官方偷偷改了miniprogram-ci?
07-29[图片] 开启 location updates of background modes 开启project.miniapp.json 的iOS 对应的 隐私权限
多端应用中调用startLocationUpdateBackground报错?多端应用不支持 wx.getSetting 接口,应该如何调用 wx.startLocationUpdateBackground 呢?wx.getSetting({ success(res) { // 如果没有拿到scope.userLocationBackground授权,提示 if (!res.authSetting['scope.userLocationBackground']) { wx.authorize({ scope: 'scope.userLocationBackground', success() { // 用户已经同意,调用wx.startLocationUpdateBackground wx.startLocationUpdateBackground({ success(res) { // 成功开启后台定位, 调用实时位置变更 console.log('后台定位开启成功') that.openLocaionListener() }, fail(res) { wx.showToast({ title: '开启后台定位失败', }) } }) } }) } else { // 已经拿到scope.userLocationBackground授权调用 wx.startLocationUpdateBackground({ success(res) { // 成功开启后台定位, that.openLocaionListener() // that.addMarker() }, fail(res) { wx.showToast({ title: '开启后台定位失败', }) } }) } }, fail(e){ console.log(e) } }) 然后更改代码为: const systemSetting = wx.getSystemSetting() const appAuthorizeSetting = wx.getAppAuthorizeSetting() console.log(appAuthorizeSetting.locationAuthorized) if(appAuthorizeSetting.locationAuthorized=='authorized'){ if(systemSetting.locationEnabled){ wx.startLocationUpdateBackground({ success(res) { // 成功开启后台定位, that.openLocaionListener() // that.addMarker() }, fail(res) { console.log(res) wx.showToast({ title: '开启后台定位失败', }) } }) }else{ console.log('请打开手机定位开关') wx.showToast({ title: '请打开手机定位开关', }) } }else{ console.log('未授权定位') wx.showToast({ title: '未授权定位', }) } 又提示:errMsg: "startLocationUpdateBackground:fail auth deny" 在多端应用中如何正确使用 wx.startLocationUpdateBackground 呢?
06-21哪个命令 ?具体是如何调用的
miniprogram-ci 2.0.5的版本 还是没解决 [object Object]的问题?修复 命令行执行完不退出的问题 修复 输出日志为[object Object]的问题 确实是还有问题,你们在测试一下 1.9.16 我这边能正常预览图片。是在云效上打包预览的 [图片] [图片]
06-182.0.5 修复了
小程序miniprogram-ci,最新版本上传完成后显示upload done,但控制台会一直卡住https://developers.weixin.qq.com/miniprogram/dev/devtools/ci.html 小程序miniprogram-ci,最新版本2.x.x,通过npx命令调用,上传完成后显示upload done,但控制台会一直卡住,而之前的1.9.x版本上传完成后能够正常退出 而且2.x.x上传时,控制台打印的是[object],而不像1.9.x是每个文件路径
06-182.0.2 修复了这个问题
miniprogram-ci运行报错?script returned exit code 1 [2024-05-31 11:57:34] + node ./upload.js -p=**** --appid=wxc91ea24a72e5d0b0 [2024-05-31 11:57:35] node:internal/modules/cjs/loader:988 [2024-05-31 11:57:35] throw err; [2024-05-31 11:57:35] ^ [2024-05-31 11:57:35] [2024-05-31 11:57:35] Error: Cannot find module './utils/handleerror/handleerror' [2024-05-31 11:57:35] Require stack: [2024-05-31 11:57:35] - /root/workspace/node_modules/miniprogram-ci/dist/modules/fullcompiler/getallwmltohtmlmap.js [2024-05-31 11:57:35] - /root/workspace/node_modules/miniprogram-ci/dist/modules/fullcompiler/index.js [2024-05-31 11:57:35] - /root/workspace/node_modules/miniprogram-ci/dist/modules/index.js [2024-05-31 11:57:35] - /root/workspace/node_modules/miniprogram-ci/dist/index.js [2024-05-31 11:57:35] - /root/workspace/upload.js [2024-05-31 11:57:35] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15) [2024-05-31 11:57:35] at Function.Module._load (node:internal/modules/cjs/loader:833:27) [2024-05-31 11:57:35] at Module.require (node:internal/modules/cjs/loader:1057:19) [2024-05-31 11:57:35] at require (node:internal/modules/cjs/helpers:103:18) [2024-05-31 11:57:35] at Object.<anonymous> (/root/workspace/node_modules/miniprogram-ci/dist/modules/fullcompiler/getallwmltohtmlmap.js:1:190) [2024-05-31 11:57:35] at Module._compile (node:internal/modules/cjs/loader:1155:14) [2024-05-31 11:57:35] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10) [2024-05-31 11:57:35] at Module.load (node:internal/modules/cjs/loader:1033:32) [2024-05-31 11:57:35] at Function.Module._load (node:internal/modules/cjs/loader:868:12) [2024-05-31 11:57:35] at Module.require (node:internal/modules/cjs/loader:1057:19) { [2024-05-31 11:57:35] code: 'MODULE_NOT_FOUND', [2024-05-31 11:57:35] requireStack: [ [2024-05-31 11:57:35] '/root/workspace/node_modules/miniprogram-ci/dist/modules/fullcompiler/getallwmltohtmlmap.js', [2024-05-31 11:57:35] '/root/workspace/node_modules/miniprogram-ci/dist/modules/fullcompiler/index.js', [2024-05-31 11:57:35] '/root/workspace/node_modules/miniprogram-ci/dist/modules/index.js', [2024-05-31 11:57:35] '/root/workspace/node_modules/miniprogram-ci/dist/index.js', [2024-05-31 11:57:35] '/root/workspace/upload.js' [2024-05-31 11:57:35] ] [2024-05-31 11:57:35] } 帮我检查一下是哪个依赖导致报错
05-31