@aeroengineerz7 Try putting the code inside the page onReady since that API is not completely ready to use until the page fully loads.
import wixSite from 'wix-site';
$w.onReady(function () {
let current = wixSite.currentPage;
console.log("http://website.org" + current.url);
});