You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const translate = require('html-google-translate');
async function testTransHtml() {
const html = '<p><i>I</i> love <a href="#">you</a>!</p>'
const transHtml = await translate(html, {
from: 'en',
to: 'es',
})
}
testTransHtml();
When I run it I get this error:
(node:92502) UnhandledPromiseRejectionWarning: Error: Cannot get TKK.
at /home/sum/sum/progs/js/node_modules/@frully/google-translate-open-api/dist/token.js:116:31
at step (/home/sum/sum/progs/js/node_modules/@frully/google-translate-open-api/dist/token.js:44:23)
at Object.next (/home/sum/sum/progs/js/node_modules/@frully/google-translate-open-api/dist/token.js:25:53)
at fulfilled (/home/sum/sum/progs/js/node_modules/@frully/google-translate-open-api/dist/token.js:16:58)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:92502) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:92502) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Any help greatly appreciated.
The text was updated successfully, but these errors were encountered:
$ grep -r 'Cannot get TKK.' node_modules/
node_modules/.pnpm/@[email protected]/node_modules/@frully/google-translate-open-api/dist/token.js: throw new Error('Cannot get TKK.');
Hi Frully, thanks for creating this repo.
I have an issue. So what I did was:
Then I have this code:
When I run it I get this error:
Any help greatly appreciated.
The text was updated successfully, but these errors were encountered: