Jump to content
Search Community

Error installing gsap/react

Cristian Coppari test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

I got this error when trying to deploy on Vercel.

Im using the last version of GSAP and @gsap/react:

npm ERR! code E403
22:17:59.965	npm ERR! 403 403 Forbidden - GET https://npm.greensock.com/@gsap%2freact/-/react-2.1.0.tgz - You must be logged in to install/publish packages.
22:17:59.965	npm ERR! 403 In most cases, you or one of your dependencies are requesting
22:17:59.965	npm ERR! 403 a package version that is forbidden by your security policy, or
22:17:59.966	npm ERR! 403 on a server you do not have access to.
22:17:59.967	
22:17:59.967	npm ERR! A complete log of this run can be found in: /vercel/.npm/_logs/2024-02-13T01_17_48_879Z-debug-0.log
22:17:59.990	Error: Command "npm install" exited with 1

 

 

 

How can I fix it?

Link to comment
Share on other sites

  • Solution

Hi @Cristian Coppari. That looks like you've got an .npmrc file somewhere that's telling it to point any  @gsap package to https://npm.greensock.com instead of the main npmjs.com repository. It looks like you're not a Club GSAP member anyway, so I'm not sure why you'd have that. 

 

In short, the key is to have it look for @gsap/react at the regular npmjs.com public repository. OR if you've got a Club GSAP membership, make sure you've got your npmrc file set up properly with your token. 

 

Sometimes people have an .npmrc file in a higher-up directory that's serving as the default, so definitely look for that if you don't find it in your project's directory. 

Link to comment
Share on other sites

I haven't a .npmrc file in the root project. I have a GSAP Club license with the agency account, but there are in differents folders.

 

EDIT: Had a .npmrc in the root of the user config folder.

Thank you so much!

Edited by Cristian Coppari
fixed
  • 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...