Jump to content
Search Community

Recommended Posts

Posted

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?

Posted
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! 

Posted

@Stoggy - can you help us with the package.json file? (Only the line containing `@gsap/shockingly` dependency would be sufficient)

 

Update:
You need to set the config in DeployHQ: 

 

 

 

  • Thanks 1
Posted

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
  • 2 weeks later...
Posted

Thanks @Prasanna I'm sure it will work since they gave me the same answer! :)

 

Will have to try in my next project. This time i solved it by adding gsap as a zip.

  • 1 year later...
derekobrien
Posted

Anyone have an example auth.json file that DeployHQ accepts for GSAP shockingly? Getting same issue but can't see how to convert .npmrc to auth.json

 

:)

Posted

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
derekobrien
Posted

Thanks Prasanna,

 

Will give that a try ?

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