[SOLVED] Moralis Conversion not working

hi another thing, I don’t know if Moralis updated the syntax

from: https://docs.moralis.io/moralis-server/sdk-utils/moralis-units
const tokenValue = Moralis.Units.FromWei(“2000000000000000000”, 6)

my code:
const tokenValue = Moralis.Units.FromWei(“2000000000000000000”, 6);
console.log(“log wei”,tokenValue);

I get this: Cannot read ‘FromWei’

It works fine for me, what you get if you run this in console: Moralis.CoreManager.get("VERSION")?

what console? like where the server is running locally?

I wanted to say browser console if you are using vanilla JS, or in your code if you are using react

Screen Shot 2021-10-06 at 5.58.35 PM

You should upgrade to a newer version of Moralis SDK,
this is what I get:

Moralis.CoreManager.get("VERSION")
'js0.0.68'

how to update the Moralis SDK? If I release the app in Mainnet where will I be updating it?

I depends what you are using for you application, updating Moralis SDK means to use a newer version for Moralis JavaScript SDK, in vanilla javascript it means to update this line: <script src="https://unpkg.com/[email protected]/dist/moralis.js"></script>

Works perfectly! thanks Crypto!