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

1K
Vistas
My Javascript file won't run because of bigint error

I am trying to use @metaplex/js to do some NFT minting. Usually my .js files work properly but when I run the file this error comes up.

bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)

I don't really get what that means. So, I tried to run npm run rebuild but rebuild is said to be a missing script and I couldn't find a way to install it.

Here is my code:

import { Connection, programs} from "@metaplex/js";
import { Loader } from "@solana/web3.js";
const { metadata: {Metadata}} = programs;


const connection = new Connection("devnet");
const tokenPublicKey = 'my_adress';

const run = async() => {
    try{
        const ownedMetadata = await Metadata.Loader(connection,tokenPublicKey)
        console.log(ownedMetadata)
    }
    catch{
        console.log('Failed to fetch')
    }

};

run();

If you have any idea, or simply an explanation of what my error means, I'd be grateful.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You are getting this error because a nested dependency has a compilation step that might not succeed in your platform. This issue provides a good explanation.

[...] This happens because one of our dependencies (bigint-buffer) runs a compilation step on installation and this can step may fail for a couple of reasons. One of the reasons is that your system might not have the build-tools the library is looking for. You can install these build tools on Windows (see https://www.npmjs.com/package/windows-build-tools), but you don't actually need to as it automatically falls back to a pure JS solution instead. Though I agree... that warning is very annoying.

However, this should give you a warning and still allow you to compile your code.

It is worth noting that the current JS SDK from Metaplex is going to be deprecated in favour of the new one: https://github.com/metaplex-foundation/js-next

With the new JS SDK, you can fetch an NFT using the following piece of code.

import { Metaplex } from "@metaplex-foundation/js-next";
import { Connection, clusterApiUrl } from "@solana/web3.js";

const connection = new Connection(clusterApiUrl("mainnet-beta"));
const metaplex = new Metaplex(connection);
const mint = new PublicKey("ATe3DymKZadrUoqAMn7HSpraxE4gB88uo1L9zLGmzJeL");

const nft = await metaplex.nfts().findByMint(mint);
about 4 years ago · Juan Pablo Isaza Denunciar
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