[SOLVED] BackEnd Error coding web3 Dex

Hello Moralis team, im trying to build the Web3 Dex following the youtube tutorial (https://www.youtube.com/watch?v=t8U7GRrlYW8) , when i get into the backEnd (around minute 41 ) making a request for the two tokens address i get an ERROR like this: bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?). Could you help me? Thanks.

const express = require("express");

const Moralis = require("moralis").default;

const app = express();

const cors = require("cors");

require("dotenv").config();

const port = 3001;

app.use(cors());

app.use(express.json());

app.get("/tokenPrice", async (req, res) => {

  const {query} = req;

  const responseOne = await Moralis.EvmApi.token.getTokenPrice({

    address: query.addressOne

  })

 

  const responseTwo = await Moralis.EvmApi.token.getTokenPrice({

    address: query.addressTwo

  })

  console.log(responseOne.raw);

  console.log(responseTwo.raw);

  return res.status(200).json({});

});

Moralis.start({

  apiKey: process.env.MORALIS_KEY,

}).then(() => {

  app.listen(port, () => {

    console.log(`Listening for API Calls`);

  });

});

Resolver.js:8:71
    at new Promise (<anonymous>) {
  isMoralisError: true,
  code: 'C0005',
  details: undefined,
  [cause]: undefined
}

Hi @Antonios1

Have you tried running npm run rebuild as suggested in the error?

Thanks Johnversus, i already solved the problem

1 Like