so I'm trying to make a terminal app but .then() dosen't do anything at all i tried to make a function that returns the response and it runs but it returns undefined i was also trying to use a libery that let me get hardware info but it was async and it didn't work can anyone help? edit: i forgot to add that the code works when i try running it in another script
full code here: https://pastebin.com/Q4bNu0h0
while (true) {
a = prompt('esyx> '.red)
if(a == 'exit'){
commands.exit.execute()
}else if(a == 'help'){
commands.help.execute()
}else if(a == 'cpu' || a == 'cpuModel'){
commands.getCpu.execute()
}else if(a == 'mem' || a == 'totalMemory'){
commands.totalMemeory.execute()
}else if(a == 'freemem' || a == 'freeMemory'){
commands.freeMemeory.execute()
}else if(a.slice(0, 4) == 'ping'){
//problem here
axios.get('https://www.shark-core.com').then(function (response) {
console.log(response);
}).catch(function (error) {
console.log(error);
}).then(function () {
//this dosen't run
console.log('testing')
});
}else{
console.log(('"' + a + '" is not a real command').red)
}
}