Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
JSON bundled with JS Unexpected SyntaxError

I have a python script that ingests a .txt file and outputs a JSON file. I use linter to ensure that the format of my JSON file is accurate. After, I run my JSON file through this line in terminal:

browserify -g reactify ./directory.js -o ./bundle.js

Which takes the contents of my JSON file and bundles them with my 'directory.js' file and outputs the bundle as 'bundle.js'.

Bundle.js is kept in my static folder for a node.js server that I run. However, when I run my localhost to see the results of my process I receive the error message:

Uncaught SyntaxError: JSON.parse: expected property name or '}' at line 1 column 2 of the JSON data

But I am not sure why. Every step of my process seems to be accurate. If I change different things in my python file, the error message may update to something like 'unexpected s found at line...' or 'unexpected : found'... I can't discern where the problem is.

The only thing that I can think is that somehow, when I bundle my JSON with my directory.js, browserify or reactify is altering the JSON somehow

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!