Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client is not a property of requestOptions #54

Open
danielmarquini opened this issue Dec 18, 2024 · 1 comment
Open

client is not a property of requestOptions #54

danielmarquini opened this issue Dec 18, 2024 · 1 comment

Comments

@danielmarquini
Copy link

const translated = await translate(message, { to: targetLang, client: 'gtx'})

Could not specify option "client='gtx'" because client is not a property of requestOptions

The object literal can only specify known properties and 'client' does not exist in the type 'RequestOptions'.ts(2353)
(property) client: string

Access to fetch at 'https://translate.google.com/_/TranslateWebserverUi/data/batchexecute?rpcids=MkEWBc&source-path=%2F&f.sid=&bl=&hl=en-US&soc-app=1&soc-platform=1&soc-device=1&_reqid=5872&rt=c' from origin 'http://myip:myport' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.Entenda o erroAI
polyfills.43174fbf84fd6cea.js:36

POST https://translate.google.com/_/TranslateWebserverUi/data/batchexecute?rpcids=MkEWBc&source-path=%2F&f.sid=&bl=&hl=en-US&soc-app=1&soc-platform=1&soc-device=1&_reqid=5872&rt=c net::ERR_FAILED 403 (Forbidden)

@AidanWelch
Copy link
Owner

The client option doesn't do anything. It just hasn't been removed from the docs yet.

As for the CORS error see here: #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants