看起来是你的代码pages/account-setting/index.js中的 _lrucache写法有问题 ci 版本用到的babel可能和你之前的babel版本不一样。处理起来不一样。babel版本可在package.json中找到
小程序同样的代码开发者工具可以上传,但是小程序的ci工具报 _lruCachehttps://developers.weixin.qq.com/miniprogram/dev/devtools/ci.html 环境: node: 18.19 pnpm: 8.15.9 miniprogram-ci: 2.1.26 _lruCache非我项目依赖,构建的dist也并无此内容 报错日志如下: { id: '50000028', message: 'Error: file: pages/account-setting/index.js\n' + ' _lruCache is not a constructor', status: 'fail' } { id: '50000029', message: 'Error: file: pages/account-setting/index.js\n' + ' _lruCache is not a constructor', status: 'fail' } { id: '50000003', message: 'Error: file: pages/account-setting/index.js\n' + ' _lruCache is not a constructor', status: 'fail' } 上传失败 CustomError: file: pages/account-setting/index.js _lruCache is not a constructor at enhance (/xxxxxxx/project/node_modules/.pnpm/miniprogram-ci@2.1.26_eslint@8.57.1/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/plugins/enhance.js:1:1579) at doTransform (/xxxxxxx/project/node_modules/.pnpm/miniprogram-ci@2.1.26_eslint@8.57.1/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/plugins/enhance.js:1:1827) at Object.runSummerPluginHook (/xxxxxxx/project/node_modules/.pnpm/miniprogram-ci@2.1.26_eslint@8.57.1/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/worker.js:1:1239) { code: 10045, path: 'dist/pages/account-setting/index.js' } node:internal/process/promises:288 triggerUncaughtException(err, true /* fromPromise */); ^ CustomError: file: pages/account-setting/index.js _lruCache is not a constructor at enhance (/xxxxxxx/project/node_modules/.pnpm/miniprogram-ci@2.1.26_eslint@8.57.1/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/plugins/enhance.js:1:1579) at doTransform (/xxxxxxx/project/node_modules/.pnpm/miniprogram-ci@2.1.26_eslint@8.57.1/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/plugins/enhance.js:1:1827) at Object.runSummerPluginHook (/xxxxxxx/project/node_modules/.pnpm/miniprogram-ci@2.1.26_eslint@8.57.1/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/worker.js:1:1239) { code: 10045, path: 'dist/pages/account-setting/index.js' } Node.js v18.19.0 Process finished with exit code 1
10-11ci 版本是什么?有没代码片段
通过miniprogram-ci上传程序包报错,无法定位到错误源?上传过程中会报以下错误。 但是无法定位到是哪一个文件在报错? 如果使用微信开发者工具进行打包上传就可以正常上传。 child process stdout: runAllAsync error: [CustomError: Error: Cannot read properties of undefined (reading 'Descendant') ] { code: 10045, plugin: 'summer-wxss', hook: 'optimize' } { id: '50000004', message: "Error: Cannot read properties of undefined (reading 'Descendant')\n", status: 'fail' }
10-11已修复 可以再试试
ip白名单已经配置,ci上传代码还是报错https://developers.weixin.qq.com/miniprogram/dev/devtools/ci.htmlhttps://developers.weixin.qq.com/miniprogram/dev/devtools/ci.html ip xx.x.xx.xx 白名单已经配置了,还是报错 20003 Error: {"errCode":-10008,"errMsg":"invalid ip: xx.x.xx.xx, reference: https://developers.weixin.qq.com/miniprogram/dev/devtools/ci.html"} CodeError: Error: {"errCode":-10008,"errMsg":"invalid ip: xx.x.xx.xx, reference: https://developers.weixin.qq.com/miniprogram/dev/devtools/ci.html"}
10-10已修复 可以再试试
ci机器人/CI工具推送代码库失败(80%概率推送失败),有知道什么原因吗?CI工具推送代码库失败(80%概率推送失败),有知道什么原因吗?[图片]
10-10private key 错误。 重新生成key的时候,要关闭浏览器插件,或使用无痕模式
CI报错 get new ticket fail innerCode: -80011?CodeError: Error: {"errCode":-1,"errMsg":"get new ticket fail innerCode: -80011"} at innerUpload (/home/gitlab-runner/builds/Lmiy6ZAB/0/ifirst/miniprogrammonorepo/node_modules/miniprogram-ci/dist/ci/upload.js:2:4091) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async upload (/home/gitlab-runner/builds/Lmiy6ZAB/0/ifirst/miniprogrammonorepo/node_modules/miniprogram-ci/dist/ci/upload.js:2:1014) at async Object.upload (/home/gitlab-runner/builds/Lmiy6ZAB/0/ifirst/miniprogrammonorepo/node_modules/miniprogram-ci/dist/utils/report.js:2:1403) at async upload (/home/gitlab-runner/builds/Lmiy6ZAB/0/ifirst/miniprogrammonorepo/packages/dtonetouchplus/ci/wx/index.js:45:3) { code: 20003 } 确认小程序appid和ci key对应得上 确认小程序代码上传密钥重新生成几次未解决 发生时间:2025年9月17日20点27分左右 appid: wx964ac644b4bbd352 时 间
09-18npm包的autoprefixer的依赖browserslist latest 不支持低版本的node。 可以自己尝试锁定一下 "name": "browserslist", "version": "4.24.4", 或是使用基于2.1.27的 2.1.28
为何miniprogram-ci 发布报错,无法使用?{"id":"50000020","message":"Error: file: comp.js\n require() of ES Module /root/.npm/_npx/a93b959afbcaed73/node_modules/baseline-browser-mapping/dist/index.js from /root/.npm/_npx/a93b959afbcaed73/node_modules/browserslist/index.js not supported.\nInstead change the require of /root/.npm/_npx/a93b959afbcaed73/node_modules/baseline-browser-mapping/dist/index.js in /root/.npm/_npx/a93b959afbcaed73/node_modules/browserslist/index.js to a dynamic import() which is available in all CommonJS modules.","status":"fail"} [log] {"id":"50000021","message":"Error: file: comp.js\n require() of ES Module /root/.npm/_npx/a93b959afbcaed73/node_modules/baseline-browser-mapping/dist/index.js from /root/.npm/_npx/a93b959afbcaed73/node_modules/browserslist/index.js not supported.\nInstead change the require of /root/.npm/_npx/a93b959afbcaed73/node_modules/baseline-browser-mapping/dist/index.js in /root/.npm/_npx/a93b959afbcaed73/node_modules/browserslist/index.js to a dynamic import() which is available in all CommonJS modules.","status":"fail"} child process stdout: runAllAsync error: CustomError: file: comp.js require() of ES Module /root/.npm/_npx/a93b959afbcaed73/node_modules/baseline-browser-mapping/dist/index.js from /root/.npm/_npx/a93b959afbcaed73/node_modules/browserslist/index.js not supported. Instead change the require of /root/.npm/_npx/a93b959afbcaed73/node_modules/baseline-browser-mapping/dist/index.js in /root/.npm/_npx/a93b959afbcaed73/node_modules/browserslist/index.js to a dynamic import() which is available in all CommonJS modules. at enhance (/root/.npm/_npx/a93b959afbcaed73/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/plugins/enhance.js:1:1579) at doTransform (/root/.npm/_npx/a93b959afbcaed73/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/plugins/enhance.js:1:1827) at Object.runSummerPluginHook (/root/.npm/_npx/a93b959afbcaed73/node_modules/miniprogram-ci/dist/modules/corecompiler/summer/worker.js:1:1239) { code: 10045, plugin: 'summer-enhance', hook: 'transform', path: 'comp.js' } 通过gitlab ci的构建提示以上错误 npx --yes miniprogram-ci upload \ -r $ROBOT_NO --uv "$CI_COMMIT_BRANCH" --ud "$CI_COMMIT_MESSAGE" \ --pp ./web_resv/dist \ --appid xxxx \ --pkp ./web_resv/config/private.xxx.key \ --enable-es6 true
09-15ci哪一个版本
miniprogram-ci 包 getCompiledResult 方法一直 pending?使用 miniprogram-ci(2.1.26版,升级之前是1.8.25版没这个问题) 的 getCompiledResult 获取编译后产物,控制台一直 pending 无返回,编译后的包实际能获取到。 const ci = require('miniprogram-ci'); const path = require('path'); const { WX_COMPILE_CONFIG } = require('../constant.js'); const createProject = require('../utils/createProject.js'); module.exports = async function ({ version = '1.0.0', zipPath = 'compiledResult.zip' } = {}) { const project = await createProject(...arguments); await ci.getCompiledResult( { project, version, setting: WX_COMPILE_CONFIG, onProgressUpdate: () => {} }, path.join(process.cwd(), zipPath), {} ); console.log('end.'); };
09-12暂不支持同时多个
miniprogram-ci不同微信小程序同时上传只成功一个?miniprogram-ci 2.1.14 不同微信小程序同时上传只成功一个,另一个会卡住 同一个微信小程序同时上传和预览,上传会被卡住
09-08关掉chrome的 浏览器插件或是 用无痕模式重试。
miniprogram-ci upload出错?ci工具上传代码出错,提示 {"errCode":-1,"errMsg":"get new ticket fail innerCode: -80011"} miniprogram-ci upload --pp . --pkp private.wx2827c2d76bbf2d9a.key --appid wx2827c2d76bbf2d9a --uv 2.0.2 -r 5 --ud 12 --enable-minify true --enable-es6 true --enable-es7 true 上传密钥已经重置十几次了,还是无法上传代码。
09-01windowHeight = screenHeight - screenTop [图片]
微信开发者工具使用wx.getWindowInfo获取windowHeight数值错误在微信开发者工具里边 API:wx.getWindowInfo() 获取到的windowHeight数值错误 非skyline项目,页面配置自定义导航栏,获取的windowHeight数值是错误的 但是已经弃用的API:getSystemInfoSync 在同等情况下获取的windowHeight是正确的。 [图片]
08-18