Skip to content

Instantly share code, notes, and snippets.

@NimJay
Created September 26, 2024 20:50
Show Gist options
  • Save NimJay/3543aa996b0d14738ab6f455d0f43db0 to your computer and use it in GitHub Desktop.
Save NimJay/3543aa996b0d14738ab6f455d0f43db0 to your computer and use it in GitHub Desktop.

Error while using Node.js Cloud Client Libraries

While trying to locally run some Node.js/JavaScript code that used a Google Cloud Node.js client library, I ran into the following erorr:

(node:22057) MetadataLookupWarning: received unexpected error = request to http://123.456.789.123/computeMetadata/v1/instance failed, 
reason: connect ENOTSUP 123.456.789.123:80 - Local (192.0.0.2:63092) code = ENOTSUP
(Use `node --trace-warnings ...` to show where the warning was created)

Solution

I was able to resolve the error by running:

gcloud auth application-default login

More info here: https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment