Decimal128.fromString gives me an error

I am trying to convert a string to Decimal128 in NodeJs but I keep getting the following error “TypeError: Cannot read property ‘fromString’ of undefined”. Here is a snippet of my code.

const {MongoClient: mongodb} = require(“mongodb”);
const MongoClient = mongodb.MongoClient;
const Decimal128 = mongodb.Decimal128;

price: Decimal128.fromString(req.body.price.toString()), // store this as 128bit decimal in MongoDB

const { Decimal128 } = require(‘mongodb’)
import { Decimal128 } from ‘mongodb’;