Using google-translate-api in Ionic throws error building the app


#1

Hi All,

I’m trying to use google-translate-api from npm install --save google-translate-api. I see errors building the application. Did anyone has used this or can you please suggest where i’m doing wrong?

// imported the files
import {translate, languages} from ''google-translate-api'';

// and using it 
if(languages.isSupported(fromLanguage) && languages.isSupported(toLanguage)){
                return translate('something', {from: 'js', to: 'en'}).then(res=>{
                    return res
                });                
            }

it throws the following error

Can some one please suggest?

Thanks,
Sandeep


#2

Hi Sandeep,

   Any luck in finding the solution ?

Thanks


#3

I’m getting the same here.


#4

Hi… I also have same issue. Have you found the solution?