收藏
回答

miniprogram-ci 执行预览命令时 报错?

const ci = require('miniprogram-ci');

(async () => {

  const project = new ci.Project({

    appid: 'xxxx',

    type: 'miniProgram',

    projectPath: 'xxxx',

    privateKeyPath: 'xxx',

    ignores: ['node_modules/**/*'],

  })

  await ci.upload({

    project,

    version: '1.2.1',

    desc: 'hello',

    setting: {

      es6: true,

    },

    onProgressUpdate: console.log,

  })

})()

["tabBar"]["list"][0]["iconPath"]: "static/image/home.png" not found

去掉tabBar中的图片就不会报错,并且 在微信开发者工具中上传和预览都不会有这种问题

回答关注问题邀请回答
收藏

4 个回答

  • Admin²⁰²⁰
    Admin²⁰²⁰
    03-19

    projectPath设置多了吗?

    检查下文件路径是否对的,文件是否存在呢?

    我用CI上传没问题。官方文档里的写法

    03-19
    有用 2
    回复 16
    • Equicy
      Equicy
      03-19
      03-19
      回复
    • Equicy
      Equicy
      03-19
      还是不行,我还在想miniprogram-ci是不是对app.json 图片路径处理方式不一样
      03-19
      回复
    • Equicy
      Equicy
      03-19
      你也是用的miniprogram-ci这个插件吗?
      03-19
      回复
    • Admin²⁰²⁰
      Admin²⁰²⁰
      03-19回复Equicy
      你app.json的tabBar这块怎么写的?是自定义的还是原生的tabBar我是原生的,目前测试木有问题。
      03-19
      回复
    • Admin²⁰²⁰
      Admin²⁰²⁰
      03-19
      这个路径配置对了吗?
      03-19
      1
      回复
    查看更多(11)
  • A.sky蓝天🎉
    A.sky蓝天🎉
    04-22

    Error: ENOENT: no such file or directory, open 'schema/dist/game.json'

        at Object.openSync (fs.js:462:3)

        at Object.writeFileSync (fs.js:1375:35)

        at mergeOnlineConfig (C:\Program Files\nodejs\node_modules\npm\node_modules\

    miniprogram-ci\dist\validate\schemaValidate.js:1:1059)

        at C:\Program Files\nodejs\node_modules\npm\node_modules\miniprogram-ci\dist

    \validate\schemaValidate.js:1:2227

        at processTicksAndRejections (internal/process/task_queues.js:97:5) {
      errno: -4058,
      syscall: 'open',
      code: 'ENOENT',
      path: 'schema/dist/game.json'
    }
    Error: ENOENT: no such file or directory, open 'schema/dist/plugin.json'
        at Object.openSync (fs.js:462:3)
        at Object.writeFileSync (fs.js:1375:35)
        at mergeOnlineConfig (C:\Program Files\nodejs\node_modules\npm\node_modules\
    miniprogram-ci\dist\validate\schemaValidate.js:1:1059)
        at C:\Program Files\nodejs\node_modules\npm\node_modules\miniprogram-ci\dist
    \validate\schemaValidate.js:1:2227
        at processTicksAndRejections (internal/process/task_queues.js:97:5) {
      errno: -4058,
      syscall: 'open',
      code: 'ENOENT',
      path: 'schema/dist/plugin.json'
    }
    Error: ENOENT: no such file or directory, open 'schema/dist/pluginpage.json'
        at Object.openSync (fs.js:462:3)
        at Object.writeFileSync (fs.js:1375:35)
        at mergeOnlineConfig (C:\Program Files\nodejs\node_modules\npm\node_modules\
    miniprogram-ci\dist\validate\schemaValidate.js:1:1059)
        at C:\Program Files\nodejs\node_modules\npm\node_modules\miniprogram-ci\dist
    \validate\schemaValidate.js:1:2227
        at processTicksAndRejections (internal/process/task_queues.js:97:5) {
      errno: -4058,
      syscall: 'open',
      code: 'ENOENT',
      path: 'schema/dist/pluginpage.json'
    }
    Error: ENOENT: no such file or directory, open 'schema/dist/projectconfig.json'
        at Object.openSync (fs.js:462:3)
        at Object.writeFileSync (fs.js:1375:35)
        at mergeOnlineConfig (C:\Program Files\nodejs\node_modules\npm\node_modules\
    miniprogram-ci\dist\validate\schemaValidate.js:1:1059)
        at C:\Program Files\nodejs\node_modules\npm\node_modules\miniprogram-ci\dist
    \validate\schemaValidate.js:1:2227
        at processTicksAndRejections (internal/process/task_queues.js:97:5) {
      errno: -4058,
      syscall: 'open',
      code: 'ENOENT',
      path: 'schema/dist/projectconfig.json'
    }
    Error: ENOENT: no such file or directory, open 'schema/dist/sitemap.json'
        at Object.openSync (fs.js:462:3)
        at Object.writeFileSync (fs.js:1375:35)
        at mergeOnlineConfig (C:\Program Files\nodejs\node_modules\npm\node_modules\
    miniprogram-ci\dist\validate\schemaValidate.js:1:1059)
        at C:\Program Files\nodejs\node_modules\npm\node_modules\miniprogram-ci\dist
    \validate\schemaValidate.js:1:2227
        at processTicksAndRejections (internal/process/task_queues.js:97:5) {
      errno: -4058,
      syscall: 'open',
      code: 'ENOENT',
      path: 'schema/dist/sitemap.json'
    }
    processing: app.json
    (node:3688) UnhandledPromiseRejectionWarning: Error: app.json: app.json
    SyntaxError: Unexpected token  in JSON at position 0
        at Object.throwError (C:\Program Files\nodejs\node_modules\npm\node_modules\
    miniprogram-ci\dist\utils\common.js:1:274)
        at Object.checkJSONFormat (C:\Program Files\nodejs\node_modules\npm\node_mod
    ules\miniprogram-ci\dist\json\common.js:1:381)
        at Object.getAppJSON (C:\Program Files\nodejs\node_modules\npm\node_modules\
    miniprogram-ci\dist\json\app\app.js:1:2143)
        at async Object.getAppJSON (C:\Program Files\nodejs\node_modules\npm\node_mo
    dules\miniprogram-ci\dist\json\app\app_merge_ext.js:1:577)
        at async Object.compileJSON (C:\Program Files\nodejs\node_modules\npm\node_m
    odules\miniprogram-ci\dist\compile\handler\mpjson.js:1:849)
        at async Object.compile (C:\Program Files\nodejs\node_modules\npm\node_modul
    es\miniprogram-ci\dist\compile\mini_program.js:1:894)
        at async Object.upload (C:\Program Files\nodejs\node_modules\npm\node_module
    s\miniprogram-ci\dist\upload\upload.js:1:1171)
        at async a (C:\Program Files\nodejs\node_modules\npm\node_modules\miniprogra
    m-ci\dist\cli.js:1:3187)
    (node:3688) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
    error originated either by throwing inside of an async function without a catch
    block, or by rejecting a promise which was not handled with .catch(). To termina
    te the node process on unhandled promise rejection, use the CLI flag `--unhandle
    d-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejectio
    ns_mode). (rejection id: 1)
    (node:3688) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
    cated. In the future, promise rejections that are not handled will terminate the
     Node.js process with a non-zero exit code.
    



    04-22
    有用
    回复 3
  • 茶杯里的风暴
    茶杯里的风暴
    04-10

    小程序代码怎么上传 请求大佬带路

    04-10
    有用
    回复 1
    • Equicy
      Equicy
      05-15
      你卡到哪一步了
      05-15
      回复
  • Equicy
    Equicy
    03-19

    感谢大佬的纠正, projectPath一定要配置对

    03-19
    有用
    回复 1
    • Equicy
      Equicy
      05-15
      社区回复的慢,有问题可以在公众号后台问我
      05-15
      回复
登录 后发表内容
问题标签