# setTimeout not a function, auth0 with preact

**URL:** <https://community.auth0.com/t/settimeout-not-a-function-auth0-with-preact/89303>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [August 23, 2022, 7:36pm UTC](https://community.auth0.com/t/settimeout-not-a-function-auth0-with-preact/89303 "2022-08-23T19:36:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jared.flomen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jared.flomen/32/33232_2.png) [@jared.flomen](https://community.auth0.com/u/jared.flomen)\
**Post date:** [August 23, 2022, 7:36pm UTC](https://community.auth0.com/t/settimeout-not-a-function-auth0-with-preact/89303/1 "2022-08-23T19:36:16Z")

</div>

Getting an error with Auth0,

ReferenceError: setTimeout is not defined

Not sure why this is happening, we have webpack along with preact

Jared

---

<div class="post-metadata">

**Author:** ![anshumanbhardwaj](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/anshumanbhardwaj/32/39528_2.png) [@anshumanbhardwaj](https://community.auth0.com/u/anshumanbhardwaj)\
**Post date:** [August 25, 2022, 11:43am UTC](https://community.auth0.com/t/settimeout-not-a-function-auth0-with-preact/89303/2 "2022-08-25T11:43:26Z")

</div>

Hi, Jared. Thanks for posting your question here.  
It’d be great if you could share a code example or GitHub repo for use to reproduce and help you.

---

<div class="post-metadata">

**Author:** ![jared.flomen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jared.flomen/32/33232_2.png) [@jared.flomen](https://community.auth0.com/u/jared.flomen)\
**Post date:** [August 30, 2022, 1:03pm UTC](https://community.auth0.com/t/settimeout-not-a-function-auth0-with-preact/89303/3 "2022-08-30T13:03:03Z")

</div>

We found the solution, thank you, just had to declare a global setTimeout function

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [November 4, 2022, 1:03pm UTC](https://community.auth0.com/t/settimeout-not-a-function-auth0-with-preact/89303/4 "2022-11-04T13:03:28Z")

</div>

Glad to hear that and thanks for sharing with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 21, 2022, 3:36pm UTC](https://community.auth0.com/t/settimeout-not-a-function-auth0-with-preact/89303/5 "2022-12-21T15:36:28Z")

</div>


