Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gsap not found in Angular project #23

Open
seaBubble opened this issue Jul 30, 2019 · 1 comment
Open

gsap not found in Angular project #23

seaBubble opened this issue Jul 30, 2019 · 1 comment

Comments

@seaBubble
Copy link

I have an Angular project and I am trying to import a Spirit animation.

I have installed the spirit npm package via
npm i spiritjs

I have added the script to the list of loaded scripts
"scripts": ["./node_modules/spiritjs/dist/spirit.js"]

Now, when I try to import the module into one of my modules and use it in appComponent:
import * as spirit from 'spiritjs';

constructor() {
spirit.loadAnimation({...})
}

TS throws 2 errors:
ERROR in node_modules/spiritjs/spiritjs.d.ts(1,64): error TS2307: Cannot find module 'gsap'.
src/app.component.ts(24,12): error TS2339: Property 'loadAnimation' does not exist on type 'SpiritStatic'.

@Lichtjaeger
Copy link

I assume that you loaded the wrong package.

This is the spirit webserver. The animation tool "spirit" is there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants