Comments (3)
We should be able to find a workaround for this :), I imagine this error happens when you are using SSR (server side rendering), where there is no Window object. I'm not familiar with Nuxt, but perhaps you can try putting it inside a client-only tag? Let me know if that works.
You may still need to polyfill window as well, something like globalSelf.window = globalSelf
, but that's not very pretty.
If that doesn't work, you could perhaps not include it in your bundle and instead use a script tag (i.e. not bundling it).
from friendly-challenge.
@gzuidhof Thank you for your quick answer! Appreciate it!
I will close this since I found a solution. The tag would not be any helpful, since the script is importing at the server-side.
Solution
The solution is to import the script only on the client with:
<script>
export default {
created() {
if (process.client)
import('friendly-challenge/widget')
}
}
</script>
Thank you again for your quick help with this!
from friendly-challenge.
Perfect :) you're welcome
from friendly-challenge.
Related Issues (20)
- Captcha works with incorrect sitekey HOT 2
- Language change bug in React HOT 4
- Angular support HOT 1
- Vietnamese translation correction
- CAPTCHA In China HOT 2
- Failing Tests With Friendly-Challenge because of: SyntaxError: Unexpected token 'export' HOT 2
- Changing the French translation HOT 2
- [Question - best practice] How to receive a new token after subsequence requests HOT 2
- Public API to detect when puzzle verification expires HOT 3
- Prevent widget to add result to page HOT 7
- TypeError in `getTemplate` HOT 3
- API mocking in Playwright HOT 1
- Adjusting the french translation HOT 2
- Create automated test suite for python SDK
- The button sent triggers the captcha HOT 1
- Planning on upgrading deprecated core-js? HOT 1
- How to use friendly-challenge in React Native? Is it possible? HOT 2
- Support for more language in data-lang attribute HOT 3
- Please add captchaai.com
- Hebrew translations HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from friendly-challenge.