I am getting this error on server start on react js.
Error: no element is specified to initialize PerfectScrollbar
However it is working fine on friend MAC OS. I am using windows.
I am using this version: "perfect-scrollbar": "^1.4.0",
Quite old question but I'll post my solution since I had the same problem. I was having the same error message:
Error: no element is specified to initialize PerfectScrollbar
In my case, it seems that I was calling PerfectScrollbar on an element that didn't exist. I had:
const asideBody = new PerfectScrollbar('.aside-body', {
suppressScrollX: true
});
And I was having the error in the pages I didn't have any element in the DOM with class="aside-body".
So I managed to only call PerfectScrollbar in the appropriate pages.