Jump to content
Search Community

Deployment issue with DeployHQ - GSAP shockingly bonus plugins E403 Forbidden

Stoggy test
Moderator Tag

Recommended Posts

Hi, 

 

I'm trying to deploy using DeployHQ but it fails during the npm install phase due to auth errors.

 

npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://npm.greensock.com/@gsap%2fshockingly/-/shockingly-3.8.0.tgz - You must be logged in to install/publish packages.
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

 

It works great locally with no problems at all.

 

I've added the .npmrc file with these lines in it:  (AUTH_TOKEN being replaced with my token)

//npm.greensock.com/:_authToken=${AUTH_TOKEN}

@gsap:registry=https://npm.greensock.com

 

Any suggestions on how to solve this?

Link to comment
Share on other sites

8 minutes ago, Cassie said:

I don't really know much about deployHQ - have you tried reaching out to them for support?

 

https://www.deployhq.com/support/build-errors/dependency-not-found <- maybe there's something in their docs to help?

Well it seems to me that this is an authentication problem and not that the dependency is not found. 

I have not, but i'll check with them as well! 

Link to comment
Share on other sites

I just received an update from DeployHq:

In order to use a private npm package within the build pipeline, you'd need to create an auth.json file, including the password/token to access the private repo. You can set this up as a config file within DeployHQ, to stop you from having to save sensitive data within your repository:

https://www.deployhq.com/support/config-files

 

This should solve the problem @Stoggy

  • Thanks 3
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

Hello @derekobrien, I don't have an auth.json file with me, but I believe now you can use environment variables instead as well. (https://www.deployhq.com/support/config-files#environment-variables).

 

You only need to add a .npmrc file to your project:

@gsap:registry=https://npm.greensock.com
//npm.greensock.com/:_authToken=${PRIVJS_TOKEN}

Then add an environment variabled named `PRIVJS_TOKEN` in your deployHQ server. This should install the packages from greensock registry.

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