Closed bala223344 closed 1 day ago
Hi, custom elements are usually not supported by server-sider-rendering engines. To fix this error, call a dynamic import('altcha')
only when rended on the client (browser).
thanks so much for yout time! it is working.
<altcha-widget challengeurl="/api/captcha/challenge"
facing this issue. in next js. it worked once first time then throwing this. cannot resolve it by any means.
ReferenceError: customElements is not defined at file:///D:/Documents/ton-tg-app/node_modules/.pnpm/altcha@1.0.0/node_modules/altcha/dist/altcha.js:1707:1 at ModuleJob.run (node:internal/modules/esm/module_job:222:25) at async ModuleLoader.import (node:internal/modules/esm/loader:316:24) { page: '/' }