Question
Build Fails when trying to get system ENV Variables
I’m attempting to use the App platform to deploy a GraphQL API made with Apollo Server as a web service. When Adding in System ENV vars, I get this error message:
Error: getaddrinfo ENOTFOUND https://osdm-api-r44fl.ondigitalocean.app/api
osdm-api | 08:46:54 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26)
osdm-api | 08:46:54 Emitted 'error' event on Server instance at:
osdm-api | 08:46:54 at GetAddrInfoReqWrap.doListen [as callback] (net.js:1499:12)
osdm-api | 08:46:54 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:17) {
osdm-api | 08:46:54 errno: 'ENOTFOUND',
osdm-api | 08:46:54 code: 'ENOTFOUND',
osdm-api | 08:46:54 syscall: 'getaddrinfo',
osdm-api | 08:46:54 hostname: 'https://osdm-api-r44fl.ondigitalocean.app/api'
osdm-api | 08:46:54 }
I’m using $self.PUBLICURL to grab the URL at build time. I’m able to get PRIVATEPORT & PUBLICROUTE_PATH without any issue.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×