I have a function to call the google speech api. Looks all is good but I cannot find why its giving me the error. I am beginner with node and promises so not sure why this error
Before using resolve you need to pass the resolve as argument:
In this case,
return new Promise((resolve, reject) => {
axios.post('YOUR URL HERE', params)
.then(response => {
resolve() // Here you can use resolve as it passed as argument
})
});