LivePersonInc / node-agent-sdk

LivePerson Agent Messaging SDK for NodeJS
MIT License
49 stars 79 forks source link

npm install failed - getaddrinfo ENOTFOUND artifactory.int.liveperson.net #154

Closed ohadcn closed 1 year ago

ohadcn commented 1 year ago

trying to install from github directly gave me that error:

root@app1:/var/src# git clone https://github.com/LivePersonInc/node-agent-sdk Cloning into 'node-agent-sdk'... remote: Enumerating objects: 1773, done. remote: Counting objects: 100% (70/70), done. remote: Compressing objects: 100% (50/50), done. remote: Total 1773 (delta 34), reused 49 (delta 19), pack-reused 1703 Receiving objects: 100% (1773/1773), 569.86 KiB | 2.77 MiB/s, done. Resolving deltas: 100% (1071/1071), done. root@app1:/var/src# cd node-agent-sdk/ root@app1:/var/src/node-agent-sdk# npm i npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm ERR! code ENOTFOUND npm ERR! syscall getaddrinfo npm ERR! errno ENOTFOUND npm ERR! network request to https://artifactory.int.liveperson.net:443/artifactory/api/npm/lp-npm-virtual/yocto-queue/-/yocto-queue-0.1.0.tgz failed, reason: getaddrinfo ENOTFOUND artifactory.int.liveperson.net npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-10-30T09_29_51_610Z-debug.log root@app1:/var/src/node-agent-sdk#

I tried to look for that domain (artifactory.int.liveperson.net) from different network and still getting the same error. how ca I run

asicath commented 1 year ago

Is there a specific reason that you need to do a clone?

Our recommended use is "npm install node-agent-sdk"

asicath commented 1 year ago

I've also deleted the package-lock.json file, so it can't be used during install and cause this problem in the future. package.json contains enough information to clone.

ohadcn commented 1 year ago

I've got there trying to run one of the examples given. Anyway I've copied it to my main project directory (where i did install the package using npm) and run it from there. Few more changes that where needed in order to run it: A. Change swift_domain to the relevant one (maybe putting it in process.env would be better for other people trying to run it) B. Since I'm using a bot liveperson account - needed to change conf format. C. Use the Agent class from the package and not by the relative path. At the end it helped me get my bot running.