intothebreach Posted September 28, 2022 Posted September 28, 2022 Hi all, During deploy using Elastic Beanstalk the instance runs npm install --production. We end up with the following error: npm ERR! code CERT_HAS_EXPIRED npm ERR! errno CERT_HAS_EXPIRED npm ERR! request to https://npm.greensock.com/@gsap%2fbusiness failed, reason: certificate has expired I have an .npmrc file included with our authToken as specified in the CI/CD section. We have tried manually adding the details to the .npmrc file using the .ebextensions but we have the same issue. This is driving me a little mad and not sure how to resolve. Thanks.
Cassie Posted September 28, 2022 Posted September 28, 2022 Hi there, oh man. what a pain. I haven't got experience with Elastic Beanstalk, but don't you worry - we'll get to the bottom of this. Sorry about the issues. Sometimes certain tools make private modules a bit difficult. Is this a new problem? Have you managed to deploy before or is this the first time you're attempting it? There's this stack overflow link which may be of use - https://stackoverflow.com/questions/24993092/how-to-use-a-private-npm-registry-on-elastic-beanstalk Also tagging in our resident expert @Prasanna
intothebreach Posted September 30, 2022 Author Posted September 30, 2022 Hi there! Thanks for replying. Yeah tried each item on that. I'm not convinced its an issue with having the access token in correctly - we have the .npmrc in the root, also tried manually adding it in a hook before the npm install runs (the answer from 2021 seems more relevant but neither work, same CERT issue). Also, it doesn't seem to be a permissions issue - Or we would be getting a 403 instead of a cert issue? Very confusing? Thanks for any help on this. 1
Cassie Posted September 30, 2022 Posted September 30, 2022 bumping @Prasanna again (sorry for multiple bumps but I'm not sure of how to help here)
Prasanna Posted September 30, 2022 Posted September 30, 2022 Hello @Cassie, @intothebreach my apologies for the late reponse. I was cross checking all my configurations and tests before answering the question. I checked all the certificates and server configuration, everything seems to be good at our end. By any chance, could there be a possibility of a firewall preventing communication outside the elastic beanstalk container? (also is port 443 open?) Alternatively, @intothebreach I would be happy to live debug the issue over google meet as well if you'd be up for it. Prasanna 4
intothebreach Posted October 3, 2022 Author Posted October 3, 2022 Hi @Prasanna Thanks for checking! Good point on the 443 port. I checked and its not on the inbound rules for that security group - going to add it now and see how that works with the security group as the source - if that doesn't work I'll open it up a bit more to see if that works. If I keep getting stuck I'll let you know and can schedule a call. Many thanks, intothebreach 2
intothebreach Posted October 18, 2022 Author Posted October 18, 2022 To keep people posted - I've had to move on with this project in order to hit deadlines, so I used an EC2 instance and wasn't able to create a build pipeline for it. On our next AWS project I'll look to try this out again and see if I can get this going with elastic beanstalk and will update here if anything goes well. 1
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