I'm using smooth-scrollbar.js version 8.7.4.
Give it a check 
As you can see there, I've linked the smooth-scrollbar.js and my main script file scripts.js.
I tried to initialize the Scrollbar but then I got the error message below:
Here is my scripts.js code that I used to initialize the Scrollbar:
Can anybody here help me solve this problem? Thanks!
CodePudding user response:
Simple answer, move the smooth-scrollbar.js script tag above your scripts.js script tag.
You're trying to access the scrollbar before the scrollbar has been loaded into the page.
CodePudding user response:
Your import order is wrong




