Jump to content
Search Community

403 Forbidden in development with Gatsby (yarn)

danny_miniaturepony test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

I'm using Gatsby version ^3.14.5, react ^17.0.2, and node 14.x.x
Deploying to AWS S3

Intended behavior:
That gsap@npm:gsap/shockingly is installed correctly locally, in development (via gh actions), in production (via gh actions).

Actual behavior:
I'm getting a 403 (forbidden) when I install dependencies in development (and presumably production). The token is absolutely exists in my .npmrc. What could possibly be the issue? Is this frequent with other users?

I am using yarn because it works better for this particular project. I tried switching to NPM to fix this specific issue but it caused a myriad of other problems. Quickly willing to provide any other necessary context that may help me resolve this issue as I've spent a lot of time trying different things to get it to work. 

Link to comment
Share on other sites

  • Solution

Sorry to hear about the trouble, @danny_miniaturepony. Yeah, Yarn has some known bugs that make it pretty annoying to deal with on private repos but from what I understand, these steps might help: 

 

$ npm config set @gsap:registry https://npm.greensock.com/
$ npm config set //npm.greensock.com/:_authToken xxxx-xxxx-xxxx-xxxx
$ yarn add @gsap/shockingly gsap@npm:@gsap/shockingly

(don't forget to put your token in there on the 2nd line)

 

Some people have reported that adding @latest to the end of the last line caused it to work: 

yarn add @gsap/shockingly gsap@npm:@gsap/shockingly@latest

 

Actually, this answer/thread might be the most helpful: 

 

Other potentially helpful resources: 

https://blog.privjs.com/article/how-to-install-club-greensock-packages-on-digitalocean-aws-etc
https://blog.privjs.com/article/how-to-install-club-greensock-packages-on-netlify

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