Basebuilder Posted August 23, 2023 Share Posted August 23, 2023 Hi all, After numerous attempts to get our Bitbucket CI/CD working with .npmrc / .yarnrc config files, I am explicitly setting the config in our install.sh script: yarn config set @gsap:registry https://npm.greensock.com yarn config set //npm.greensock.com/:_authToken xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx yarn install When it runs it shows that the config is applied, but the download is refused with a 403 error: yarn config v1.22.19 success Set "@gsap:registry" to "https://npm.greensock.com". Done in 0.05s. yarn config v1.22.19 success Set "//npm.greensock.com/:_authToken" to "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". Done in 0.05s. yarn install v1.22.19 [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... error An unexpected error occurred: "https://npm.greensock.com/@gsap%2fbusiness/-/business-3.12.2.tgz: Request failed \"403 Forbidden\"". Does anyone have an idea how to get it to work? We have a valid business license, and locally it works fine. Thanks so much, Menno Link to comment Share on other sites More sharing options...
Rodrigo Posted August 23, 2023 Share Posted August 23, 2023 Hi @Basebuilder and welcome to the GreenSock forums! Thanks for being a Club GreenScock member and supporting GreenSock! Normally when using yarn this config on the .npmrc file works for me: always-auth=true registry=https://npm.greensock.com @gsap:registry=https://npm.greensock.com //npm.greensock.com/:_authToken=${NPM_TOKEN} Where I get NPM_TOKEN from an environmental variable. I'm not familiar at all with Bitbucket's CI/CD pipelines so I can't offer specific advice on that, but hopefully this helps. Let us know if you have more questions. Happy Tweening! Link to comment Share on other sites More sharing options...
Basebuilder Posted August 24, 2023 Author Share Posted August 24, 2023 Thanks @Rodrigo, Just a note that we were unable to get this to work and decided to install from tarball. Bye, Menno Link to comment Share on other sites More sharing options...
Rodrigo Posted August 24, 2023 Share Posted August 24, 2023 Hi Sorry about the inconvenience. I'll ping @Prasanna and hopefully he'll provide a solution for this. Please stand by. Link to comment Share on other sites More sharing options...
Prasanna Posted August 25, 2023 Share Posted August 25, 2023 Hello @Basebuilder, it appears that the version of yarn cli that you are using in bitbucket pipelines could be the issue. Can you try doing this instead: Run this command once in the repo $ yarn add @gsap/business gsap@npm:@gsap/business This should fix the pipelines. 1 Link to comment Share on other sites More sharing options...
Solution Basebuilder Posted August 28, 2023 Author Solution Share Posted August 28, 2023 Hi @Prasanna and @Rodrigo, Thank you. That indeed works. To recap for anyone bumping into this thread later. We are deploying successfully in our Bitbucket pipeline by adding to our pipeline script: yarn config set @gsap:registry https://npm.greensock.com yarn config set //npm.greensock.com/:_authToken xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx And by running yarn add @gsap/business gsap@npm:@gsap/business to update the package.json file. Thank you for your support, Menno 1 2 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