Jump to content
GreenSock

Oussamalkd

Nuxt Property '$gsap' does not exist on type

Recommended Posts

I want to usenuxt-gsap-module on my nuxt app.

I follow the docs in github : https://github.com/ivodolenc/nuxt-gsap-module

but I can't acces to this.$gsap in may pages and components, it throws an error :  Property '$gsap' does not exist on type 'XXX'

my package.json file

 

"devDependancies" : {

"nuxt-gsap-module": "1.7.1"

}

 

index.vue 

boxRotation (): void {
    const gsap = this.$gsap
    gsap.to('.box', { rotation: 27, x: 100, duration: 1 })
  }
  mounted () :void {
    this.boxRotation()
  }

 

nuxt.config.js

 

 

buildModules: [
    '@nuxt/typescript-build',
    'nuxt-gsap-module'
  ],
image.png.7974a48138526d9fd66ca6d0aabb574f.png
Link to comment
Share on other sites

Hi there - I'm afraid nuxt-gsap-module isn't a GSAP product.  It's a third party package.

 

Sorry I can't help. Maybe someone else will know what the issue is?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×