getaddrinfo ENOTFOUND upload.box.com upload.box.com:443
Hi All,
I want to upload a file into box my code snippet is as below:
filesToBox: async function(){
var result = getAkanaToken().then(getBoxToken).then(token =>{
var client = sdk.getBasicClient(token);
var fileData = fs.createReadStream('myfilepath \\test999.txt')
client.files.uploadFile('0', 'test999.txt', fileData, function(err, file) {
if (err){console.log('err: ' + err);
}
else{console.log('file uploaded: ' + file);
}
});
});
}
here I am getting the below output with an error 443 :
akana_token :: EJzf3b6KvPIBsHjQGgLh3T7H6U3C
box_token=PABLk9FBtO6iVH1wFfGjn0Vsyt92LaT6
err: Error: getaddrinfo ENOTFOUND upload.box.com upload.box.com:443
Can anyone please help to fix it.
-
Hi ,
That error will generally mean that the remote host (upload.box.com) cannot be resolved on your system. If you're running off of localhost some of the general guidance I can see if to add a localhost entry to your hosts file, such as by doing the following:
- From a terminal, run sudo vi /etc/hosts
- Add 127.0.0.1 localhost
Hope that helps,
Jon
Please sign in to leave a comment.
Comments
1 comment