收藏
回答

请检查 project.config.json 是否存在及是否有效

框架类型 问题类型 操作系统 工具版本
小程序 Bug macOS 1.03.2011120
.
├── node_modules
├── package.json
└── miniprogram-project
        ├── app.js
        ├── app.json
        ├── app.wxss
        ├── miniprogram_npm 
        ├── pages
        ├── sitemap.json
        └── project.config.json



/Applications/wechatwebdevtools.app/Contents/MacOS/cli open --project ./miniprogram-project

以上命令都不行,报错如下

✔ IDE server has started, listening on http://127.0.0.1:65364

✖ preparing

[error] {

  code: 19,

  message: 'Error: 请检查 project.config.json 是否存在及是否有效 (code 19)Error: 请检查 project.config.json 是否存在及是否有效 (code 19)\n' +

    '    at Object.PROJECT_CONFIG_JSON_NOT_VALID_OR_NOT_EXIST (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/core.wxvpkg/7201d239ccdbdc262e2ecf5fe0c8aca3.js:2:93)\n' +

    '    at Proxy.checkProjectConfigJSON (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/core.wxvpkg/cae8f972f394b0e652328148346813d1.js:2:353)\n' +

    '    at Proxy.exports.getProjectInfo (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/core.wxvpkg/9d9d19a87db58211a644d4d305c488d5.js:2:1786)\n' +

    '    at Object.exports.openProject [as method] (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/core.wxvpkg/f753f8cbc1ed543c2038bc39e0e75405.js:2:1124)\n' +

    '    at Object. (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/core.wxvpkg/7a975443f52e91830ae1d65cdf8c86db.js:2:3505)\n' +

    '    at Object.a.emit (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/core.wxvpkg/d15bfd6a2234129f5ea1f808e801b055.js:26:9539)\n' +

    '    at Object.onMessage (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/core.wxvpkg/d15bfd6a2234129f5ea1f808e801b055.js:26:4002)\n' +

    '    at m. (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/core.wxvpkg/d15bfd6a2234129f5ea1f808e801b055.js:26:3494)\n' +

    '    at m.emit (events.js:203:13)\n' +

    '    at e.exports._receiver.onmessage (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/core.wxvpkg/d15bfd6a2234129f5ea1f808e801b055.js:11:4941)'

}


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": ""
    },
    "bundle": false,
    "useIsolateContext": true,
    "useCompilerModule": true,
    "userConfirmedUseCompilerModuleSwitch": false,
    "userConfirmedBundleSwitch": false,
    "packNpmManually": false,
    "packNpmRelationList": [],
    "minifyWXSS": true
  },
  "compileType": "miniprogram",
  "libVersion": "2.14.1",
  "appid": "xxxxxxxxxx",
  "projectname": "",
  "debugOptions": {
    "hidedInDevtools": []
  },
  "scripts": {},
  "isGameTourist": false,
  "simulatorType": "wechat",
  "simulatorPluginLibVersion": {},
  "condition": {
    "search": {
      "list": []
    },
    "conversation": {
      "list": []
    },
    "game": {
      "list": []
    },
    "plugin": {
      "list": []
    },
    "gamePlugin": {
      "list": []
    },
    "miniprogram": {
      "list": []
    }
  }
}


最后一次编辑于  2020-12-28
回答关注问题邀请回答
收藏

4 个回答

  • 小鱼甘比
    小鱼甘比
    2022-06-17

    灰色部分项目目录不对,换上绝对路径

    2022-06-17
    有用
    回复
  • 莉莉娅
    莉莉娅
    2021-04-23

    我也遇到同样的问题,有解决方法吗?

    2021-04-23
    有用
    回复
  • 我比时光プ更薄凉ぐ
    我比时光プ更薄凉ぐ
    2021-04-20

    我也遇到同样的问题,他报的错误就不对,应该是路径错误! 项目路径要使用绝对路径

    2021-04-20
    有用
    回复
  • 猛男陈阔
    猛男陈阔
    2020-12-28

    project.config.json应与app.js同级

    2020-12-28
    有用
    回复 1
    • 蟹蟹有钳
      蟹蟹有钳
      2020-12-28
      你好 我把项目结构改了 还是报一样的错
      2020-12-28
      回复
登录 后发表内容
问题标签