[ app.json 文件内容错误] app.json: 未找到 ["sitemapLocation"] 对应的 sitemap

运行项目报错
sitemap.json Error: 未找到入口 sitemap.json 文件,或者文件读取失败,请检查后重新编译。

解决方法:
在pages.json 文件中添加属性
“sitemapLocation”:“sitemap.json”
在小程序的更目录下面添加sitemap.json文件,一定要在小程序根目录
如果没看到sitemap.json,但提示已存在,则打开文件所在目录,把sitemap搞出来就行

配置为
`
{
“rules”: [{
“action”: “allow”,
“page”: “*”
}]

}
如果pages.json 已有"sitemapLocation":“sitemap.json” 属性且无法创建 sitemap.json重新编译hbbuild即可

posted @ 2022-06-08 19:51  柯宝宝智商感人  阅读(5825)  评论(1编辑  收藏  举报