Share Posted January 22 I'm trying to deploy my app to vercel. I tried with these two tutorials: https://vercel.com/guides/using-private-dependencies-with-vercel https://blog.privjs.com/article/how-to-install-club-greensock-packages-on-vercel I keep getting error like below: error An unexpected error occurred: "https://npm.greensock.com/@gsap%2fshockingly/-/shockingly-3.11.4.tgz: Request failed \"403 Forbidden\"". To summarize what I did: 1. Installed gsap shockingly package with command below: npm install gsap@npm:@gsap/shockingly 2. Created ".npmrc" file in the root dir of my project with content like below: always-auth=true @gsap:registry=https://npm.greensock.com //npm.greensock.com/:_authToken=MY-TOKEN-HERE 3. Set up environment variables in the Vercel project using commands below: vercel env add NPM_RC production < ~/.npmrc vercel env add NPM_RC preview < ~/.npmrc vercel env add NPM_RC development < ~/.npmrc 4. Verified in Vercel that ENVs are indeed created with correct values 5. Initialized deploy. To be clear installing locally works as intended. Please help 1 Link to comment Share on other sites More sharing options...
Share Posted January 22 paging @Prasanna! Link to comment Share on other sites More sharing options...
Author Share Posted January 23 @Cassie I've managed to get it working. Changed package manager from yarn to npm. 2 Link to comment Share on other sites More sharing options...
Share Posted January 23 Ah it's always issues with yarn. Sorry I should have asked about that. There's some known issues with private repos (from Yarns side) 🫠 Link to comment Share on other sites More sharing options...
Share Posted January 30 I managed to deploy GSAP Shockingly to Vercel using yarn and have posted a solution on the link below. Might be worth checking for users who don't want to switch their projects over to npm. 4 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now