Jump to content
Search Community

Installing gsap@business on Digital Ocean static site app

intothebreach test
Moderator Tag

Recommended Posts

Hi,

 

Running into issues on deployment here. Main issue is that I cannot run yarn add gsap@npm:@gsap/business before the yarn install command is made in the app build.

I have included the .npmrc file as usual.

I've been trying to think of work arounds for this, using the postinstall or preinstall scripts, but keep getting caught in infinite loops and its a bit hacky.

As far as I can tell there is no way in Digital Ocean to add in any prehooks to the build before the yarn install, but I will reach out to their support too to see if there is.

 

Any help would be appreciated as it is a big pain to not be able to use the business package on a DO static site build.

 

Best,

 

ITB

Link to comment
Share on other sites

Hello @intothebreach,

If the .npmrc file contains the access token the installation should proceed without any problems. Some versions of yarn doesn't read local .npmrc file so, it would be good to run this command once:

npm config set @gsap:registry https://npm.greensock.com
npm config set //npm.greensock.com/:_authToken xxxx-yyyy-zzzz

Replace xxxx-yyyy-zzzz with your token. Once you run the above two commands, installation should proceed just fine

  • Like 2
Link to comment
Share on other sites

Hi @Prasanna

As per your suggestion, I've added the above commands in the "preinstall" script int he package.json -

"preinstall": "npm config set @gsap:registry https://npm.greensock.com && npm config set //npm.greensock.com/:_authToken {MY-CODE-HERE}",

In theory this should run before the yarn install, and looks like it is doing so, but I still get the error:

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

According to the Digital ocean support, they are using Heroku build packages and sent me this documentation here:
https://devcenter.heroku.com/articles/nodejs-support#private-dependencies
This still feels like the problem is that I cannot call yarn add gsap@npm:@gsap/business before the yarn install process. I'll try with using npm instead of yarn and see if it makes a difference.

 

Thanks,
ItB

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