square / connect-api-examples

Code samples demonstrating the functionality of the Square Connect API
https://developer.squareup.com/docs/sample-apps
395 stars 790 forks source link

`npm install` ENOTFOUND: artifactory.global.square #471

Open lee0c opened 3 months ago

lee0c commented 3 months ago

Hi. I am trying to run the graphql sample. When I attempt npm install, I get the following:

npm error code ENOTFOUND
npm error syscall getaddrinfo
npm error errno ENOTFOUND
npm error network request to https://artifactory.global.square/artifactory/api/npm/square-npm/word-wrap/-/word-wrap-1.2.5.tgz failed, reason: getaddrinfo ENOTFOUND artifactory.global.square
npm error network This is a problem related to network connectivity.
npm error network In most cases you are behind a proxy or have bad network settings.
npm error network
npm error network If you are behind a proxy, please make sure that the
npm error network 'proxy' config is set properly.  See: 'npm help config'

I'm not behind a proxy, just on my home network which as far as I know has extremely boring configuration.

I've tried these commands as well:

python3 -c "import socket; print(socket.getaddrinfo('artifactory.global.square', 443))"
# output
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
ping artifactory.global.square
# output
ping: artifactory.global.square: Name or service not known
curl https://artifactory.global.square/artifactory/api/npm/square-npm/word-wrap/-/word-wrap-1.2.5.tgz
# output
curl: (6) Could not resolve host: artifactory.global.square

Any idea what I am doing wrong?

bai312 commented 3 months ago

我安装ios-deploy 时也报了这写错误,我也想知道怎么解决这类问题