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

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?


1 Like

Hi Sandeep,

   Any luck in finding the solution ?


I’m getting the same here.

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