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

402
Views
replit error? SyntaxError: Unexpected token < in JSON at position 0 ,if not,how to slove it?

Im trying to make a discord account generator and using ouo.io to upload the accounts in,but everytime i try to gen,replit died.

<!DOCTYPE HTML>
^

SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> (/home/runner/AccountGenerator/node_modules/hastebin-save/src/upload.js:18:52)
    at IncomingMessage.emit (events.js:326:22)
    at IncomingMessage.EventEmitter.emit (domain.js:483:12)
    at endReadableNT (_stream_readable.js:1241:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
repl process died unexpectedly: exit status 1

upload.js code:

const https = require('https');
const config = require('./../config.json')

module.exports = function(text, callbackFunction){
    var req = https.request({
        headers: {
            "Content-Type": "application/json; charset=utf-8"
        },
        host: config.host,
        port: config.port,
        path: config.path,
        method: "POST"
    }, clb => {
        var data = "";
        clb.on('data', buffer => {
            data += buffer;
        });
        clb.on("end", () => {callbackFunction(JSON.parse(data).key)});
    });
    req.write(text);
    req.end();
}
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!