Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

290
Vistas
Getting EHOSTUNREACH node fetch

I coded simple js app that fetch data from arveawe, but getting and EHOSTUNREACH error

import fetch from 'node-fetch';
import fs from 'fs';

let rawfile = fs.readFileSync('./Result.json');
let file = JSON.parse(rawfile);

console.log(`Items:`);
console.log(`========================================================`);

let nameAndUri = {};
let map = {};
let arr = [];
let settings = {method: 'GET', headers: {Accept: 'application/json'}};

file.forEach(itr => {
    // nameAndUri[itr.data.name] = itr.data.uri;

    console.log(itr.name);
    fetch(itr.uri, settings)
        .then(res => res.json())
        .then((json) => {
            arr.push(json);
        })
        .catch(error => { throw error; });
});

console.log(arr);

console.log(`========================================================`);
console.log(`Finished count...`);
console.log(`========================================================`);

I also tried axios but same result..

FetchError: request to https://arweave.net/xxxxxxxxxxxxxxxxxxxx failed, reason: connect EHOSTUNREACH 99.86.240.11:443 at ClientRequest. (file:///xxxxxxxxxxx/node_modules/node-fetch/src/index.js:108:11) at ClientRequest.emit (events.js:400:28) at TLSSocket.socketErrorListener (_http_client.js:475:9) at TLSSocket.emit (events.js:400:28) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:82:21) { type: 'system', errno: 'EHOSTUNREACH', code: 'EHOSTUNREACH', erroredSysCall: 'connect' }

I was looking for some solution, but nothing found..

node fetch version node-fetch@3.2.4
node version v16.15.0

thanks

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda