Jump to content
Search Community

yarn 403 Forbidden error when i include yarn.lock

Nightshift test
Moderator Tag

Recommended Posts

hi, i installed gsap following the instructions. i have an .npmrc

//npm.greensock.com/:_authToken=5cb-----959
registry=https://registry.npmjs.org/
@gsap:registry=https://npm.greensock.com

i get this error 

error An unexpected error occurred: "https://npm.greensock.com/@gsap%2fbusiness/-/business-3.12.4.tgz: Request failed \"403 Forbidden\"".

when i delete my yarn.lock or edit it to remove gsap from the yarn.lock then it works. I need to keep my yarn.lock in my repo. any suggestions on how to fix this? This error occurs in vercel and circleci.

Link to comment
Share on other sites

Hi @Nightshift and welcome to the GSAP Forums!

 

Thanks for being a Club GSAP member and supporting GSAP!

 

I just created a new React project using Yarn and deployed it to Vercel without any issues:

https://github.com/rhernandog/yarn-bonus-test-vercel

 

Here is the live URL:

https://yarn-bonus-test-vercel.vercel.app/

 

If you check the console you'll see the version of ScrollSmoother that is being loaded and registered correctly using the gsap.registerPlugin() method.

 

I made some changes and deployed again and I don't have to delete the yarn.lock file in order to get it working. Honestly I don't have a lot of experience with Yarn but I don't recall any issues like this.

 

Did you created an environmental variable in your Vercel project's settings:

oJJftIe.png

Is your token working locally without any issues? You can try creating a new folder (name doesn't matter) and then creating a new npm project in it using:

npm init -y

Then create the .npmrc file with your token and install GSAP with the bonus plugins and see if it works.

 

Happy Tweening!

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