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

371
Views
Fix a JSON.parse error in Node.js by using Cheerio to Web-Scraping and get Instagram Profile Details

Steps to reproduce

  • Run this command
    mkdir t && \
    cd t && \
    npm init -y && \
    npm i express ejs cheerio request-promise && \
    wget -O index.js https://pastebin.com/raw/c3v48UdG && \
    mkdir views && \
    wget -O ./views/index.ejs https://pastebin.com/raw/UMXHkreq && \
    node index.js
    
  • Visit localhost:5000 and try to generate info from any instagram user
  • See the error in the console
    ~/t/index.js:49
    } = JSON.parse(/window\._sharedData = (.+);/g.exec(script)[1]);
                                                                ^
    
    TypeError: Cannot read properties of null (reading '1')
        at start (~/t/index.js:49:61)
    

Mentions

  • above pastebin code is from this guide
  • this Instagram Private Web API client for Node does have the same issue
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!