apparently LocomotiveScroll isn't imported, so I can't use smooth scroll: '''import LocomotiveScroll from 'locomotive-scroll';'''
            Asked
            
        
        
            Active
            
        
            Viewed 382 times
        
    3
            
            
        - 
                    Please provide enough code so others can better understand or reproduce the problem. – Community Sep 28 '22 at 22:02
 
2 Answers
2
            
            
        I ran into the same issue while using typescript. I was able to resolve it by installing the locomotive type definitions after I installed locomotive itself.
npm install locomotive-scroll
npm i --save-dev @types/locomotive-scroll
        Mitchell Long
        
- 27
 - 4
 
0
            
            
        first you need to install locomotive scroll
try
npm install locomotive-scroll
and then on you js file
import LocomotiveScroll from "locomotive-scroll";
   let options = {
        el: currentScrollContainer,
        smooth: true,
        getSpeed: true,
        getDirection: true,
    };
    scroll = new LocomotiveScroll(options);
        Dpk
        
- 567
 - 5
 - 16