Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

479
Visualizações
Unable to pull data from JSON file, ReferenceError getFile is not Defined

I am unable to pull JSON file data from the Uniswap_Surface_Rates.json file. enter image description hereIt keeps giving me Reference error : getFile is not defined.

I think I'm not entering the relative path correctly but neither google nor youtube searches have helped.

These are the absolute paths for the files

F:\Downloads\Triangular Arbitrage\RESOURCES\Uniswap2JS\main.js

F:\Downloads\Triangular Arbitrage\RESOURCES\UniSwap2\Uniswap_Surface_Rates.json

// GET DEPTH //////////////////
async function getDepth(amountIn, limit) {
  
    // Get JSON Surface Rates 
    console.log("Reading Surface Rate Information...")
        let fileInfo = getFile("..\UniSwap2\Uniswap_Surface_Rates.json");
        fileJsonArray = JSON.parse(fileInfo);
        fileJsonArrayLimit = fileJsonArray.slice(0, limit);
        console.log(fileJsonArrayLimit);
    
    
        return
    }

    getDepth(amountIn=1 , limit=2)
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Your error says:

ReferenceError getFile is not Defined

This means the getFile itself is not defined. So the problem is not with the path.

Where is the getFile function declaration? Or where are you importing it from?

Maybe you meant to use fs.readFile? Or fsPromises.readFile?

But if you do have a getFile() declared or imported somewhere, please add it to the question, along with the rest of the code where you import the function into the file you declared getDepth().

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda