微信开发者工具命令行上传错误
发布于 7 年前 作者 pmo 11888 次浏览 来自 问答

项目在做自动发布,用到了微信开发者工具的命令行工具上传项目,上传遇到两个问题

    1.在调用打开项目的时候出现报错说项目配置有问题

    2.上传命令提示成功,但是上传的文件不全进不了游戏

项目在微信开发者工具上可以运行,手动上传成功,可正常进游戏,说明项目配置本身没问题

test.sh

export DEV_TOOLS=/Applications/wechatwebdevtools.app/Contents/Resources/app.nw/bin
export PATH=$DEV_TOOLS:$PATH
 
cli -o base64@/Users/jacob/Documents/h5/Demo_wxgame
cli -p /Users/jacob/Documents/h5/Demo_wxgame
cli -u 1.1.5.302@/Users/jacob/Documents/h5/Demo_wxgame --upload-desc 'Jenkins-1.1.5.302'

终端输出

tony-BlackMac:h5 jacob$ ./test.sh
Initializing...
idePortFile: /Users/jacob/Library/Application Support/微信web开发者工具/Default/.ide
IDE server has started, listening on http://127.0.0.1:36663
initialization finished
StatusCodeError: 400 - "{\"code\":400002,\"error\":\"请检查是否 project.config.json 是否存在及是否有效\"}"
Initializing...
idePortFile: /Users/jacob/Library/Application Support/微信web开发者工具/Default/.ide
IDE server has started, listening on http://127.0.0.1:36663
initialization finished

preparing preview...

#预览二维码,扫描后也可正常体验,就是上传后的有问题不能正常体验

Initializing...
idePortFile: /Users/jacob/Library/Application Support/微信web开发者工具/Default/.ide
IDE server has started, listening on http://127.0.0.1:36663
initialization finished
uploading project...
 
upload success

project.config.json

{
    "description": "项目配置文件。",
    "setting": {
        "urlCheck": false,
        "es6": true,
        "postcss": true,
        "minified": true,
        "newFeature": true
    },
    "compileType": "game",
    "libVersion": "game",
    "appid": "wx****************",
    "projectname": "Demo",
    "condition": {
        "search": {
            "current": -1,
            "list": []
        },
        "conversation": {
            "current": -1,
            "list": []
        },
        "plugin": {
            "current": -1,
            "list": []
        },
        "game": {
            "current": -1,
            "list": [
                {
                    "id": 0,
                    "name": "强制更新模拟编译",
                    "query": ""
                }
            ]
        },
        "miniprogram": {
            "current": -1,
            "list": []
        }
    }
}
2 回复

不全是什么意思?

代码包多大?

给下appid?

wxcff80354f4ef7c99


不全的意思是可能有些文件没上传成功,命令行上传后,进入游戏提示js/egret.min.js加载失败。手动上传没问题


本地代码大小 3840 KB

回到顶部