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

174
Visualizações
Hardhat.config.js: Cannot find module '@ethersproject/experimental/nonce-manager'

I'm having trouble including the NonceManager class in my hardhat config:

I can't use import statements in the file it seems. So I've tried

const NonceManager = require("@ethersproject/experimental/nonce-manager");

and

const { NonceManager } = require("@ethersproject/experimental/nonce-manager");

But I get the error:

Error: Cannot find module '@ethersproject/experimental/nonce-manager'

My devDependencies in package.json include:

"@ethersproject/experimental": "^5.6.0", and "ethers": "^5.6.0",

Not sure what I'm doing wrong here. For context, here is the file and its exports: https://github.com/ethers-io/ethers.js/blob/master/packages/experimental/lib/nonce-manager.js

Thanks!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Have you made sure to npm install?

When you clone an existing project, the node_modules folder is often in the .gitignore to save space and download time. This means that you should cd to your project folder and run npm install, which will download any missing packages.

EDIT: It appears you're just using the wrong import/require. Here is the correct way to import it:

// Node
const { NonceManager } = require("@ethersproject/experimental");

// ESM/TypeScript
import { NonceManager } from "@ethersproject/experimental";

See the bottom of https://docs.ethers.io/v5/api/experimental/

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