perfect-scrollbar icon indicating copy to clipboard operation
perfect-scrollbar copied to clipboard

TypeError: PerfectScrollbar is not a constructor

Open GNSubrahmanyam opened this issue 7 years ago • 4 comments

angular.js:14800 TypeError: PerfectScrollbar is not a constructor

GNSubrahmanyam avatar Mar 08 '18 20:03 GNSubrahmanyam

It looks like you are using old version, try this documentation: https://github.com/utatti/perfect-scrollbar/tree/0.8.1

dikirill avatar Mar 14 '18 14:03 dikirill

@dikirill still not working

handhikadj avatar Dec 10 '19 17:12 handhikadj

how can we reproduce this issue?

mattonit avatar Jan 16 '20 12:01 mattonit

I am having the same issue in certain constellation with version 1.5.3. I am beginner level with javascript and trying to write a vue3 app, so i might just don't get things right. I'd like to write typescript but have javascript as well enabled because i am using a template written with javascript and vue2...

It works when I import PerfectScrollbar from 'perfect-scrollbar'; and then in a method new PerfectScrollbar(mycontainer);

I get _ TypeError: PerfectScrollbar is not a constructor_ when i try following in a method.

let PerfectScrollbar = await import('perfect-scrollbar')
new PerfectScrollbar(mycontainer);

I am not sure, but when i read docs about js modules i get the impression both should work. Does this info help somehow? :)

dIeGoLi avatar Dec 26 '21 20:12 dIeGoLi