I'm a noob so go easy on me haha I am trying to use utils from ethers and I am getting an error.

Property 'utils' does not exist on type 'typeof import("C:/Users/xxxxxx/node_modules/ethers/lib.commonjs/ethers")'.

setBalance(ethers.utils.formatUnits(balanceInWei, 'SAFEMOON'));
  • What version of ethers are you using?
    – Ismael
    Commented Jul 15, 2023 at 4:29

1 Answer 1


Just do

 let ethers = require('./node_modules/ethers')
 ethers.utils.formatUnits(balanceInWei, 18)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.