doubleyong
管理员
管理员
  • 最后登录2025-10-08
  • 发帖数1198
  • 最爱沙发
  • 喜欢达人
  • 原创写手
  • 社区居民
  • 忠实会员
阅读:4068回复:0

[前端]【uniapp】[JHINT]Expected "y to match '"[" from line 1 and instead saw "':".

楼主#
更多 发布于:2022-07-20 14:45
使用uniapp 做微信小程序的开发
pages.json文件,提示:


[JHINT]Expected "y to match '"[" from line 1 and instead saw "':".

找了好久的配置这些呀,最终发现还是语法问题,不过和提示的位置不太一致;


最后发现:
      对象中,应该是 逗号 的写成了 分号,改了就好了。
"tabBar": {
    "list": [
        {
            "pagePath": "pages/home/home";
            "text": "首页";
            "iconPath": "images/cart1.png";
            "selectedIconPath": "images/cart1.png"
        },
        {
            "pagePath": "pages/home/home";
            "text": "首页";
            "iconPath": "images/cart1.png";
            "selectedIconPath": "images/cart1.png"
        },
        {
            "pagePath": "pages/shoppingCart/shoppingCart";
            "text": "购物车";
            "iconPath": "images/cart1.png";
            "selectedIconPath": "images/cart1.png"
        }
    ]
},


所以,
    遇到这类bug,提示的行数,和内容不太准确; 整个文件都要进行语法检查
知识需要管理,知识需要分享
游客


返回顶部

公众号

公众号