Jump to content
Search Community

npm install bonus plugins not working

thedamon test
Moderator Tag

Recommended Posts

I tried the `npm install ./gsap-bonus.tgz` instruction from the docs and in two different projects it stopped my project dev server from working due to unfound dependencies.

 

in a gridsome project, as soon as I add the gsap bonus dependency I get the error: `Cannot find module '../build/Release/sharp.node'`

in a parcel.js project, as soon as I add the gsap bonus dependency I get the error: `Cannot find module 'trim-right'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)`

 

both of these errors resolve themselves by removing the gsap dependency from my `package.json` file.

Link to comment
Share on other sites

That is super weird and nobody else has reported anything like that. GSAP doesn't have ANY dependencies either, so I have no idea why those errors you're getting would have anything to do with GSAP. Can you provide a reduced test case with only the bare minimum code/files to reproduce the issue so that we can test it on our end? Maybe upload your project to github or something? Or codesandbox? Stackblitz? It's just super difficult to troubleshoot blind. I'm pretty sure this isn't GSAP-related, but I understand why you'd think it is given the fact that you said this only happens after you install GSAP. It just doesn't make much sense to me without having any context to go on. 

 

What version of GSAP are you using? And are you importing from the root or the "dist" directory? 

  • Like 1
Link to comment
Share on other sites

I just got the club green package and was trying it out... it works completely fine if I put it in my src folder (i think i may not have tested exactly)

 

the weird thing is that i'm not even importing the files.. just added the dependency and then my dev server stopped working. I've never added a dep via a tarball before, and I do generally use yarn over npm.. not sure if that could cause a difference.

 

I agree that it doesn't really make... any sense at all.......

 

I'll try it in a vue-cli project in a bit (might be a few days) and see if something similarly weird happens..

 

I can just use the files locally, but I'm not sure how to set things up in order to deploy to netlify from my (hopefully public) github repo.. (i kinda want the code for what i'm working on to be public.. but maybe i can .gitignore the plugins  (if i use them in the end not sure yet) and manually include them on the server

  • Like 1
Link to comment
Share on other sites

I'm not super familiar with yarn, but I thought it was very similar to NPM and I suspect you could still npm install the tarball file. I noticed that the following link recommended that you try yarn cache clean dep

https://github.com/yarnpkg/yarn/issues/6811

 

And yeah, if you don't mind doing a .gitignore for the bonus plugins, that'd be swell. 👍

 

Enjoy the bonus tools, and thanks so much for joining Club GreenSock! Welcome aboard. 🙌

Link to comment
Share on other sites

10 hours ago, thedamon said:

I've never added a dep via a tarball

 

Basically, every package you install is a tarball. That's what you download when you do something like npm install react or yarn add react.

 

But yeah, you shouldn't mix npm and yarn installs. Just use yarn add ./gsap-bonus.tgz. Last time I did a yarn install, it wouldn't work unless I included the ./ in the path.

 

And yarn should def be added to the installation page. 👇

 

 

 

  • Like 3
Link to comment
Share on other sites

  • 1 year later...

I'm sorry I'm very confused. I just purchased the $99 member plan to use morphsvgplugin and it says I need to generate token. I did that but I am lost as to how I can get it working on my current project by using npm. Can I get some help please?

 

I figured it out soon after!

Edited by Jakebogan
solved
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.
×
×
  • Create New...