-
Notifications
You must be signed in to change notification settings - Fork 22
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
oe.URLSearchParams is not a constructor Error #17
Comments
Same Problem. |
same problem |
Same problem |
1 similar comment
Same problem |
Hi @dcoales, thanks for creating this issue. Thank you to the others for saying you're also affected. I was able to reproduce the issue; it appears that URLSearchParams is not supported in the Node environment that logseq uses. By quickly removing URLSearchParams from deepl-node I was able to get it working in logseq in a limited way. Unfortunately to make this change without breaking other parts of the library is more difficult. I'll update when I have more information. |
How is this labelled as enhancement when it is clearly a bug? 😀 |
Hi @glumb, this problem doesn't occur in any "native" node version we support, rather with logseq that we haven't specifically tested in yet. One could argue that changing the lib to extend support for logseq would be an enhancement 😉 However, you're right, it's clearer if we label this a bug. |
same issue here. Running into the error with node 16.x and 18.13.0 |
Any updates on this @daniel-jones-deepl? Cant't use this library with the bug and our configuration.. |
@daniel-jones-deepl |
Daniel is out at the moment, but our team will look into this |
A workaround is to put
at the top of the file (e.g. at the end of the imports, outside the main function). That allows me to translate with the plugin. The issue is webpack injecting a different version of url, I am investigating a clean way to fix this. |
I have tried to use this library but when I run my code I get the following error in the browser console:
Desktop (please complete the following information):
Additional context
I'm using typescript and have no errors when I build my app - only when I run it. However, I'm not a professional programmer so it's possible I've installed the wrong version of something. My tsconfig.json file is below:
and my package.json
I'm running this as a plugin to a tool called LogSeq. The plugin code is below. Any help would be much appreciated. Thanks.
The text was updated successfully, but these errors were encountered: