no-scroll NPM package isn't working

Hi guys,
I’m quite new to Wix.
I have been trying to add lock scrolling function in my free Wix website.
But I notice HTML and CSS customization isn’t available in free Wix website.
So, I tried to search some packages in NPM package.
I found no-scroll NPM package.
Here is my code.

import scroll  from "no-scroll";

// According to its documentation
const noScroll = require('no-scroll');

$w.onReady(function () {
    noScroll.on();
})

The scroll should be locked after the page loads.
But it isn’t working.
Can you guys suggest me another way to lock scrolling or correct me where I went wrong?

Hi! It looks like you are trying to use the no-scroll package in a Wix website, but it seems that the package is not designed to work with Wix specifically. Additionally, it seems that you are trying to use a mix of JavaScript import syntax and CommonJS require syntax in your code, which may be causing issues. One option you could try is to include the no-scroll package as a script in your Wix website using the Wix HTML widget.

Can you please suggest me another way to lock scrolling without using Wix HTML widget?

This package require access to DOM, while in Velo env, it is a blocked to access dom. Please use custom code instead: Embedding Custom Code on Your Site | Help Center | Wix.com.

Not related to syntax, and using HTML widget won’t work.