Antdev Posted April 24, 2022 Share Posted April 24, 2022 I have successfully imported Draggable and Inertia into my Vue JS app but for some reason I am getting an error trying to import Observer. I am getting an error: This dependency was not found: * gsap/Observer in ./node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/ts-loader??ref--14-1!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/App.vue?vue&type=script&lang=ts import { gsap } from 'gsap'; import { Observer } from 'gsap/Observer'; import { Draggable } from 'gsap/Draggable'; import { InertiaPlugin } from 'gsap/InertiaPlugin'; import interact from 'interactjs' gsap.registerPlugin(Draggable); gsap.registerPlugin(InertiaPlugin); gsap.registerPlugin(Observer); Link to comment Share on other sites More sharing options...
Solution Cassie Posted April 24, 2022 Solution Share Posted April 24, 2022 Hey there - are you using the latest version of GSAP? 1 Link to comment Share on other sites More sharing options...
Antdev Posted April 24, 2022 Author Share Posted April 24, 2022 1 hour ago, Cassie said: Hey there - are you using the latest version of GSAP? Hmm well I am now. I did notice the github version had the observer in types but mine didn't so after failing to manually add these I ran npm install gsap and wow and behold it fixed it. Thank you Cassie. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now