微信小程序:微信开发者工具导入wepy-cli生成的项目后控制台报错显示app.json: app.json 未找到

   日期:2020-10-07     浏览:130    评论:0    
核心提示:解决“微信开发者工具导入wepy-cli生成的项目后控制台报错显示app.json: app.json 未找到”的问题微信小程序开发者工具版本:导入之前项目根目录下的project.config.json文件:{ "description": "A WePY project", "setting": { "urlCheck": true, "es6": false, "postcss": false, "minified": false }, "comp

解决“微信开发者工具导入wepy-cli生成的项目后控制台报错显示app.json: app.json 未找到”的问题

微信小程序开发者工具版本:

导入之前项目根目录下的project.config.json文件:

{ 
  "description": "A WePY project",
  "setting": { 
    "urlCheck": true,
    "es6": false,
    "postcss": false,
    "minified": false
  },
  "compileType": "miniprogram",
  "appid": " wx4e367dd65dd063b6",
  "projectname": "heima_ugou",
  "miniprogramRoot": "./dist"
}

导入之后项目根目录下的project.config.json文件被修改为:

{ 
  "description": "项目配置文件",
  "packOptions": { 
    "ignore": []
  },
  "setting": { 
    "urlCheck": true,
    "es6": true,
    "enhance": false,
    "postcss": true,
    "preloadBackgroundData": false,
    "minified": true,
    "newFeature": false,
    "coverView": true,
    "nodeModules": false,
    "autoAudits": false,
    "showShadowRootInWxmlPanel": true,
    "scopeDataCheck": false,
    "uglifyFileName": false,
    "checkInvalidKey": true,
    "checkSiteMap": true,
    "uploadWithSourceMap": true,
    "compileHotReLoad": false,
    "useMultiFrameRuntime": false,
    "useApiHook": true,
    "babelSetting": { 
      "ignore": [],
      "disablePlugins": [],
      "outputPath": ""
    },
    "useIsolateContext": true,
    "useCompilerModule": true,
    "userConfirmedUseCompilerModuleSwitch": false,
    "packNpmManually": false,
    "packNpmRelationList": []
  },
  "compileType": "miniprogram",
  "libVersion": "2.13.1",
  "appid": "wx4e367dd65dd063b6",
  "projectname": "heima_ugou",
  "miniprogramRoot": "./dist",
  "debugOptions": { 
    "hidedInDevtools": []
  },
  "scripts": { },
  "isGameTourist": false,
  "simulatorType": "wechat",
  "simulatorPluginLibVersion": { },
  "condition": { 
    "search": { 
      "current": -1,
      "list": []
    },
    "conversation": { 
      "current": -1,
      "list": []
    },
    "game": { 
      "current": -1,
      "list": []
    },
    "plugin": { 
      "current": -1,
      "list": []
    },
    "gamePlugin": { 
      "current": -1,
      "list": []
    },
    "miniprogram": { 
      "current": -1,
      "list": []
    }
  }
}

问题原因:

导入项目后project.config.json文件被微信开发者工具修改,缺少代码:"miniprogramRoot": "./dist"从而导致微信开发者工具无法找到app.json文件进而报错:app.json: app.json 未找到

解决办法:

project.config.json文件中添加如下代码后从新编译即可:

"miniprogramRoot": "./dist"
 
打赏
 本文转载自:网络 
所有权利归属于原作者,如文章来源标示错误或侵犯了您的权利请联系微信13520258486
更多>最近资讯中心
更多>最新资讯中心
0相关评论

推荐图文
推荐资讯中心
点击排行
最新信息
新手指南
采购商服务
供应商服务
交易安全
关注我们
手机网站:
新浪微博:
微信关注:

13520258486

周一至周五 9:00-18:00
(其他时间联系在线客服)

24小时在线客服