zgiw
zgiw
  • 发布:2024-03-28 15:57
  • 更新:2024-04-16 19:48
  • 阅读:120

pages.json解析失败,不符合 json 规范

分类:HBuilder

Hbuilder编译时会提示错误:Error: pages.json解析失败,不符合 json 规范
15:43:58.798 Unexpected token  in JSON at position 0
15:43:58.798 at getJson (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-cli-shared\lib\json.js:39:11)
15:43:58.798 at getPagesJson (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-cli-shared\lib\pages.js:39:27)
15:43:58.798 at Object.<anonymous> (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\lib\env.js:235:22)
15:43:58.798 at Module._compile (node:internal/modules/cjs/loader:1126:14)
15:43:58.798 at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
15:43:58.798 at Module.load (node:internal/modules/cjs/loader:1004:32)
15:43:58.798 at Function.Module._load (node:internal/modules/cjs/loader:839:12)
15:43:58.798 at Module.require (node:internal/modules/cjs/loader:1028:19)
15:43:58.798 at require (node:internal/modules/cjs/helpers:102:18)
15:43:58.799 at Object.<anonymous> (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\index.js:5:5)
15:43:58.951 Error: getaddrinfo ENOTFOUND 96f0e031-f37a-48ef-84c7-2023f6360c0a.bspapp.com
15:43:58.951 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26) {
15:43:58.951 errno: -3008,
15:43:58.951 code: 'ENOTFOUND',
15:43:58.951 syscall: 'getaddrinfo',
15:43:58.951 hostname: '96f0e031-f37a-48ef-84c7-2023f6360c0a.bspapp.com'
15:43:58.951 }

我是一直找不到问题在哪里,哪怕是我只保留一个首页路由,也是一样报错

pages.json:
{
"pages": [{
"path": "pages/home",
"style": {
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true
}
}, {
"path": "pages/home/more",
"style": {
"navigationBarTitleText": "更多应用"
}
}, {
"path": "pages/login",
"style": {
"navigationStyle": "custom",
"disableScroll": true
}
}, {
"path": "pages/msg",
"style": {
"navigationBarTitleText": "消息",
"enablePullDownRefresh": true
}
}, {
"path": "pages/msg/chat",
"style": {
"navigationBarTitleText": "对话列表",
"enablePullDownRefresh": true
}
}, {
"path": "pages/my",
"style": {
"navigationBarBackgroundColor": "#0c86d8",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "我的",
"backgroundColorTop": "#0c86d8",
"backgroundColorBottom": "#f3f3f3"
}
}, {
"path": "pages/workflow/mytask/list",
"style": {
"navigationBarTitleText": "我的任务",
"enablePullDownRefresh": true
}
}, {
"path": "pages/workflow/mytask/single",
"style": {
"navigationBarTitleText": "任务详情",
"backgroundColorTop": "#FFFFFF"
}
}, {
"path": "pages/workflow/mytask/submit",
"style": {
"navigationBarTitleText": "任务提交",
"backgroundColorTop": "#FFFFFF"
}
}, {
"path": "pages/workflow/mytask/sign",
"style": {
"navigationBarTitleText": "流程加签与审核",
"backgroundColor": "#FFFFFF"
}
}, {
"path": "pages/workflow/releasetask/list",
"style": {
"navigationBarTitleText": "发起流程",
"disableScroll": true
}
}, {
"path": "pages/workflow/releasetask/single",
"style": {
"navigationBarTitleText": "创建流程"
}
}, {
"path": "pages/workflow/common/easyerp-wfsubmit-info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "pages/crm_mydesktop/mycreate/list",
"style": {
"navigationBarTitleText": "我的创建",
"enablePullDownRefresh": true
}
}, {
"path": "pages/crm_mydesktop/mycreate/query",
"style": {
"navigationBarTitleText": "我的创建",
"enablePullDownRefresh": false
}
}, {
"path": "pages/crm_mydesktop/mycreate/single",
"style": {
"navigationBarTitleText": "我的创建",
"enablePullDownRefresh": false
}
}, {
"path": "pages/crm_visit/visitplan/list",
"style": {
"navigationBarTitleText": "拜访计划",
"enablePullDownRefresh": true
}
}, {
"path": "pages/crm_visit/visitplan/query",
"style": {
"navigationBarTitleText": "拜访计划",
"enablePullDownRefresh": false
}
}, {
"path": "pages/crm_visit/visitplan/single",
"style": {
"navigationBarTitleText": "拜访计划",
"enablePullDownRefresh": false
}
}],
"subPackages": [{
"root": "pagesMy",
"pages": [{
"path": "info",
"style": {
"navigationBarTitleText": "我的信息"
}
}, {
"path": "contact",
"style": {
"navigationBarTitleText": "我的联系方式"
}
},
{
"path": "password",
"style": {
"navigationBarTitleText": "更改密码"
}
}
]
}],
"preloadRule": {
"pages/my": {
"network": "all",
"packages": ["pagesMy"]
}
},
"globalStyle": {
"navigationBarTextStyle": "black",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFF",
"backgroundColor": "#f3f3f3",
"navigationBarTitleText": "莹光CRM",
"mp-alipay": {
"allowsBounceVertical": "NO"
}
},
"tabBar": {
"color": "#8c8c8c",
"selectedColor": "#3398DC",
"borderStyle": "black",
"backgroundColor": "#f5f5f5",
"list": [{
"pagePath": "pages/home",
"iconPath": "static/img-bar/tab-home.png",
"selectedIconPath": "static/img-bar/tab-home-active.png",
"text": "首页"
},
{
"pagePath": "pages/my",
"iconPath": "static/img-bar/tab-my.png",
"selectedIconPath": "static/img-bar/tab-my-active.png",
"text": "我的"
}
]
},
"easycom": {
"custom": {
"^easyerp-(.*)": "@/components/easyerp-mpui/$1.vue",
"tki-qrcode": "@/components/tki-qrcode/tki-qrcode.vue"
}
}
}

2024-03-28 15:57 负责人:无 分享
已邀请:
JXWang

JXWang

看起来没啥问题,检查一下是否有什么隐藏字符之类的

DCloud_UNI_HRK

DCloud_UNI_HRK

贴了你的代码小修了一下,没发现问题。能否发个问题工程?

要回复问题请先登录注册