JSON parse error: when i try to build the theme

Hi im having this error when i try to build the site, hugo v0.100.2-d25cb2943fd94ecf781412aeff9682d5dc62e284+extended linux/amd64 BuildDate=2022-06-08T10:25:57Z VendorInfo=gohugoio
11:09:12 AM: ERROR 2024/10/10 09:09:12 failed to process “/aberdeen-28315/index.html”: “/tmp/hugo-transform-error144167507:370:40”: JSON parse error: expected comma character or an array or object ending on line 370 and column 40
11:09:12 AM: 292: {
11:09:12 AM: ^ can someone please help my repo is GitHub - SamHamou/Work

mmh, I’m not sure how you build the site but processing /aberdeen-28315/index.html looks rather strange…

I’m not able to reproduce the problem with a fresh clone and standard hugo build:

git clone https://github.com/SamHamou/Work.git
cd Work
hugo

Start building sites …
hugo v0.100.2-d25cb2943fd94ecf781412aeff9682d5dc62e284+extended windows/amd64 BuildDate=2022-06-08T10:25:57Z VendorInfo=gohugoio

                   | EN
-------------------+------
  Pages            |  12
  Paginator pages  |   0
  Non-page files   |   0
  Static files     | 213
  Processed images |   0
  Aliases          |   4
  Sitemaps         |   1
  Cleaned          |   0

Total in 145 ms
  • recheck your content folder if there’s something that should not be there locally

  • do a fresh build by removing public and resources before calling hugo

ii dont think i have this folders ( public and resources ) in my repo
ps: are you using netlify ? or github pages

update: just disabled JSON minification and the site was built successfully

Neither, I just build it locally as shown above:

I checked your netlify and added the --minify locally and get your error :slight_smile:

that also fails with the most recent version…

locally it looks like all minification fails. and the complain is a missing comma in your JSON part at line 370 in the files:

there’s definitely a missing comma after the first article

    {
      "@type": "Article",
      "headline": "#1 Local Piano Movers in Denver, CO | Affordable \u002b Reliable",
      "datePublished": "2019-10-15T03:01:14-04:00",
      "dateModified": "2019-10-15T03:01:14-04:00",
      "url": "https:\/\/nchugo.netlify.app\/",
      "description": ""
    }
    {
      "@type": "Article",
      "headline": "1 Piano Movers in Aberdeen NC 28315",
      "datePublished": "2019-10-15T03:01:14-04:00",
      "dateModified": "2019-10-15T03:01:14-04:00",
      "url": "https:\/\/nchugo.netlify.app\/aberdeen-28315\/",
      "description": "Looking For a Piano Moving Pro? Get an Appointment With Expert Piano Movers in Aberdeen, NC Tell Us About Your Piano Move We need a few details about your project. 1. …"
    },

update : the problem was in my schema, after removing it now i can build with --minify