Jump to content
Search Community

gsap business installation error (ERR! code E403 - You must be  logged in to install/publish packages.)

Yellow Car test
Moderator Tag

Recommended Posts

6 months ago, I succeeded to install gsap business and all worked great. but today I decided to start a new project and I can not get gsap/business to work. 

 

I did put the appropriate code in my .npmrc file.

 

but when I run npm install, I get errors about not being logged in.

 

(logged into what? In my browser I am logged into gsap. And also github. What else can I possibly log in to?)

 

PS C:\Users\chris\vscode\donut> npm install gsap@npm:@gsap/business
npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://npm.greensock.com/@gsap%2fbusiness/-/business-3.6.1.tgz - You must be 
logged in to install/publish packages.
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\chris\AppData\Local\npm-cache\_logs\2021-04-26T22_02_43_858Z-debug.log
PS C:\Users\chris\vscode\donut>

Link to comment
Share on other sites

So I tried opening this link in my browser (chrome).

And it just shows the error in my browser as json data.

This is the same browser I am using to post this message, so I don't see how I could be "not logged in".

{
  "error": "You must be logged in to install/publish packages."
}
Link to comment
Share on other sites

Sorry to hear about the trouble, @Yellow Car. Hm. Just to be clear, the whole "not logged in" thing has nothing to do with the browser or you being logged into the greensock.com site. The private NPM repo itself is trying to validate your token and failing. I wonder if you tried clearing your lock file and cache, that may help. I assume you followed the install instructions too. 

 

Also, you aren't using yarn, are you? That ecosystem has some known bugs that [to my knowledge] haven't been fixed. 

 

I believe there are some problems with NPM 7.x that introduced a bug with private repo authentication. You could try running these two install commands:

npm install @gsap/business
npm install gsap@npm:@gsap/business

The reason why we need two install commands is because the first command inserts the correct package into the npm cache. So the next command will be able to retrieve the package directly from the npm cache. 

  • Like 1
Link to comment
Share on other sites

npm cache clean gives these errors...

PS C:\Users\chris\vscode\donut> npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues
npm ERR! by treating integrity mismatches as cache misses.  As a result,
npm ERR! data extracted from the cache is guaranteed to be valid.

Link to comment
Share on other sites

So, I rebooted my pc just in case that might help. 

Then I made an empty folder.

I ran npm init there to create the package.json file.

I then created the .npmrc file and copied code as suggested by my gsap install instructions.

I tried to clean cache, but as noted above, this led to npm errors saying the cache cannot get corrupted.

Then I tried again with...

npm install gsap@npm:@gsap/business

Errors are the same as before...

 

PS C:\Users\chris\vscode\hopscotch> npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help init` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (hopscotch) 
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to C:\Users\chris\vscode\hopscotch\package.json:

{
  "name": "hopscotch",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}


Is this OK? (yes)
PS C:\Users\chris\vscode\hopscotch> npm install gsap@npm:@gsap/business
npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://npm.greensock.com/@gsap%2fbusiness/-/business-3.6.1.tgz - You must be logged in to install/publish packages.
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\chris\AppData\Local\npm-cache\_logs\2021-04-27T01_30_11_563Z-debug.log
PS C:\Users\chris\vscode\hopscotch>

 

Link to comment
Share on other sites

PS C:\Users\chris\vscode\hopscotch> ls


    Directory: C:\Users\chris\vscode\hopscotch


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         4/26/2021   9:29 PM            110 .npmrc
-a----         4/26/2021   9:27 PM            205 package.json


 

Link to comment
Share on other sites

Can you try doing this: Delete the .npmrc file in the project then run the following commands (don't forget to replace the <your-auth-token> with the correct token

 

$ npm config set @gsap:registry https://npm.greensock.com/
$ npm config set //npm.greensock.com/:_authToken <your-auth-token>
$ npm install @gsap/business
$ npm install gsap@npm:@gsap/business

This should solve the issues :) 

 

Let me know if it still doesn't work

 

  • Thanks 2
Link to comment
Share on other sites

Hey @Yellow Car, this is what's going on when you execute each commands:

 

$ npm config set @gsap:registry https://npm.greensock.com/

^ This command adds the following entry to the ~/.npmrc file:
@gsap:registry=https://npm.greensock.com


$ npm config set //npm.greensock.com/:_authToken <your-auth-token>

^ Just like the previous this command adds the following entry to the ~/.npmrc file:
//npm.greensock.com/:_authToken=<your-auth-token>

 

You might notice that the above entries are the exact lines specified in the Greensock installation docs. But sometimes, manual errors might cause some issues while entering data into the .npmrc file like adding/missing an extra space/character. These commands just prevents the same from happening.


$ npm install @gsap/business

^ This command is required to fill the npm cache in npm v7. I'ts a weird bug introduced in the npm v7 that causes installation failures while using package name aliases


$ npm install gsap@npm:@gsap/business

Finally, this is the command that installs the package "@gsap/business" and gives it an alias name "gsap". As a result, you can import code from the business package like all other regular greensock packages: import GSAP from 'gsap'  - this will import code from @gsap/business package in our case

 

Pretty cool huh? 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...

I'm having the same issue, when trying to npm install gsap in my new nuxt project. I keep getting "Cannot find module 'gsap/ScrollTrigger.min.js'" even after I followed all above steps.

 

Could the issue be that I had originally used "npm install ./gsap-bonus.tgz" and then reverted to the above?

 

I tried everything from left to right now 😑😅

Link to comment
Share on other sites

@animationmagic it's tough to troubleshoot blind but that error message sounds like your path is wrong and/or you're trying to use the regular ES5 minified file instead of the module. 

 

// BAD
import ScrollTrigger from "gsap/ScrollTrigger.min.js";

// GOOD
import ScrollTrigger from "gsap/ScrollTrigger";

// or if you need the non-ES6 file, use the /dist/ folder:
import ScrollTrigger from "gsap/dist/ScrollTrigger";

 

Link to comment
Share on other sites

  • 2 weeks later...
18 hours ago, Prasanna said:

 

You can edit it by running: `nano ~/.npmrc`

Thanks,

 

but I am still experiencing error 😢

 

npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://npm.greensock.com/@gsap%2fbusiness - bad authorization header. Please login again
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/myfoldername/.npm/_logs/2022-05-28T22_55_08_444Z-debug.log

Link to comment
Share on other sites

I tried the following command below however, it didn't work.  

 

 

  1. Add a file names .npmrc to the project root with the following contents in it:
always-auth=true
@gsap:registry=https://npm.greensock.com/
//npm.greensock.com/:_authToken=${PRIVJS_TOKEN}
save-exact=true
  1. Install the package using the following command:
$ yarn add @gsap/shockingly gsap@npm:@gsap/shockingly

 

I also tried this below:  not successful

 

$ npm config set @gsap:registry https://npm.greensock.com/
$ npm config set //npm.greensock.com/:_authToken <your-auth-token>
$ npm install @gsap/business
$ npm install gsap@npm:@gsap/business

 

I have been struggling for a few days now, and badly need help. I am very new to this, thank you!

Screen Shot 2022-05-27 at 3.35.54 PM.png

  • Like 1
Link to comment
Share on other sites

I'm a bit confused - it doesn't look like you signed up for Club GreenSock at all, so it would make sense that you're getting errors. Your token wouldn't grant you access to the "business" repository (you don't have a "Business Green" Club GreenSock membership). 

 

If you don't have a membership and don't need the bonus plugins, there's no need for you to use the private repository at all. So perhaps it's as easy as deleting the "gsap" and "gsap-trial" in that packages list (I'm confused about why you added both), and then just rerun the "npm install gsap". Done. 

 

If you do end up signing up for Club GreenSock and run into any trouble, I'd encourage you to follow the instructions at this blog post: https://blog.privjs.com/article/how-to-install-club-greensock-packages-on-vercel

 

But the fundamental problem here seems to be that your token doesn't have access to the "business" level benefits because you're not a "business" member. 

 

Does that help at all? 

Link to comment
Share on other sites

11 minutes ago, GreenSock said:

I'm a bit confused - it doesn't look like you signed up for Club GreenSock at all, so it would make sense that you're getting errors. Your token wouldn't grant you access to the "business" repository (you don't have a "Business Green" Club GreenSock membership). 

 

If you don't have a membership and don't need the bonus plugins, there's no need for you to use the private repository at all. So perhaps it's as easy as deleting the "gsap" and "gsap-trial" in that packages list (I'm confused about why you added both), and then just rerun the "npm install gsap". Done. 

 

If you do end up signing up for Club GreenSock and run into any trouble, I'd encourage you to follow the instructions at this blog post: https://blog.privjs.com/article/how-to-install-club-greensock-packages-on-vercel

 

But the fundamental problem here seems to be that your token doesn't have access to the "business" level benefits because you're not a "business" member. 

 

Does that help at all? 

Hi Jack , 

 

Thanks for your response, I am sorry I am absolutely new to this. I registered to get the Module Installation Token but didn't sign up for Club Greensock as payment is required for $99 per year? I'm sorry, I'm confused too. Correct me if I'm wrong. Do I need to purchase anything in order for me to get the library? Thanks

 

I was successfully deleted the packages list "gsap" and "gsap-trial" however, when I reinstall the "npm install gsap"   ... this what I received

 

npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://npm.greensock.com/gsap - bad authorization header. Please login again
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/myusername/.npm/_logs/2022-05-29T03_04_43_126Z-debug.log

 

 

Thanks, I appreciate your assistance

Link to comment
Share on other sites

If your GSAP-enhanced site/product generates a fee from multiple users (including micro-transactions, subscription fees, etc.), it requires the commercial license which comes with Business Green memberships.
 

The only other reasons to sign up for Club GreenSock are to

  1. Get the bonus members-only plugins, or
  2. Support our ongoing development efforts.

But please don’t feel any pressure. We’re passionate about having happy customers around here, and we never want someone’s money if they don’t feel like they’re getting incredible value

 

The "Simply Green" ($99/yr) package includes a subset of the bonus plugins. The "Shockingly Green" ($149/yr) includes ALL the plugins and the "Business Green" ($199/yr) includes all the plugins plus the special commercial license. See https://greensock.com/club for details. 

 

If you're only using the core (none of the bonus plugins) in a site/product that's free for everyone, you don't need ANY Club GreenSock membership. 

 

Here's what I'd suggest. Completely delete EVERYTHING having to do with GSAP first. It looks like you configured things so that @gsap is pointing at https://npm.greensock.com as the repository but DON'T do that. Set it back to the default for now. Once you're completely back to normal (no special configurations), do a simple npm install gsap and see if that gets you up and running. Try to do some basic tweens (no special plugins). That may be all you need. 

 

If you do need to get some bonus plugins or the license, sign up for Club GreenSock. You'll then get a special token that'll let you get access to the "business" or "shockingly" or "simply" private repository packages. But again, I think it'd be best since you're getting confused to simply strip everything back and start over completely with the public package (no special tokens or access required). Then we can go from there. Fair enough? 

  • Like 1
Link to comment
Share on other sites

56 minutes ago, GreenSock said:

If your GSAP-enhanced site/product generates a fee from multiple users (including micro-transactions, subscription fees, etc.), it requires the commercial license which comes with Business Green memberships.
 

The only other reasons to sign up for Club GreenSock are to

  1. Get the bonus members-only plugins, or
  2. Support our ongoing development efforts.

But please don’t feel any pressure. We’re passionate about having happy customers around here, and we never want someone’s money if they don’t feel like they’re getting incredible value

 

The "Simply Green" ($99/yr) package includes a subset of the bonus plugins. The "Shockingly Green" ($149/yr) includes ALL the plugins and the "Business Green" ($199/yr) includes all the plugins plus the special commercial license. See https://greensock.com/club for details. 

 

If you're only using the core (none of the bonus plugins) in a site/product that's free for everyone, you don't need ANY Club GreenSock membership. 

 

Here's what I'd suggest. Completely delete EVERYTHING having to do with GSAP first. It looks like you configured things so that @gsap is pointing at https://npm.greensock.com as the repository but DON'T do that. Set it back to the default for now. Once you're completely back to normal (no special configurations), do a simple npm install gsap and see if that gets you up and running. Try to do some basic tweens (no special plugins). That may be all you need. 

 

If you do need to get some bonus plugins or the license, sign up for Club GreenSock. You'll then get a special token that'll let you get access to the "business" or "shockingly" or "simply" private repository packages. But again, I think it'd be best since you're getting confused to simply strip everything back and start over completely with the public package (no special tokens or access required). Then we can go from there. Fair enough? 

 

Hi Jack,

 

Thanks for the clarification regarding membership and that is actually fair. I want to try the bonus plugins for now and see if they will work for me.  Going back to the main error main concern for deployment.  I was able to reinstall  "npm install gsap" but when I try to check if it is running "npm start" this is what it showed below:

 

Module not found: Error: Can't resolve 'gsap/DrawSVGPlugin' in '/Users/myusername/Desktop/myreactportfolio/src/components/Home/Logo'
ERROR in ./src/components/Home/Logo/index.js 9:0-47
Module not found: Error: Can't resolve 'gsap/DrawSVGPlugin' in '/Users/myusername/Desktop/myreactportfolio/src/components/Home/Logo'

 

Further to this,  I am also not certain if the "yarn-error.log" file is one of the reasons or my code for gsap is correct? tho it was working on local repository. Please see attached picture.  Thank you in advance. 

Screen Shot 2022-05-28 at 10.15.16 PM.png

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...