Jump to content
Search Community

404 Error when trying to npm install GSAP

bfredtim test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

This was working last week and I don't think anything has changed in my codebase to account for it. I have a Business Green license and have the token correctly added to my .npmrc file. But when I try to run "npm install gsap@npm:@gsap/business" I get the following error:

 

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@gsap%2fbusiness - Not found
npm ERR! 404
npm ERR! 404  '@gsap/business@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

 

This error has started happening on two sites that were working fine just a few days ago. Anyone else seeing this issue?

Link to comment
Share on other sites

  • Solution

We haven't changed anything on our end. That error looks like your project is looking at the wrong registry (registry.npmjs.org instead of npm.greensock.com)

 

Maybe try to run these commands again?: 

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

Notice there's a space between _authToken and your actual unique token (which you get from your account dashboard)

 

Maybe you need to clear any cache too? Perhaps delete any .lock files? I'm grasping at straws here a bit :)

 

Thanks for being a Club GreenSock member!

  • Like 4
  • Thanks 2
Link to comment
Share on other sites

Weird, I don't know where that registry was coming from. Found no reference to it in my files. Anyway, I ran the commands you suggested again and either that fixed it or the gremlins just got tired of messing with me. Either way, it's working again. Thanks Jack!

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

Hi @thefa and welcome to the GreenSock forums!

 

Thanks for being a Club GreenSock and supporting GreenSock!

 

I'm not familiar at all with npm task. What particular setup/pipeline are you using? Digital Ocean, AWS, Azure, something else? That particular extra info can be really helpful in order to nudge you in the right direction.

 

Happy Tweening!

Link to comment
Share on other sites

Hello @thefa, Adding a .npmrc file to your project should solve the problem.

 

Steps:
1. Add a new file `.npmrc` in your project root

2. Add the following content in the `.npmrc` file:

```

@gsap:registry=https://npm.greensock.com
//npm.greensock.com/:_authToken=xxxx-yyyy-zzzz

```

3. Replace `xxxx-yyyy-zzzz` with your access token

 

Pro tip: You can also store the token as env variables

 

  • Like 2
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...