# onReady() function throwing error on EVERY page

**URL:** <https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [December 31, 2021, 6:17pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347 "2021-12-31T18:17:07Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmacklin](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@lmacklin](https://forum.wixstudio.com/u/lmacklin)\
**Post date:** [December 31, 2021, 6:17pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/1 "2021-12-31T18:17:07Z")

</div>

I have hundreds of pages on my website which have been working fine. As of this morning, the onReady() function on EVERY page is throwing an error - Property ‘onReady’ does not exist on type ‘(selector: string) =\> any’.

The onReady() has a squiggly red line under it and if I hover my mouse over it I see the above message.

It doesn’t matter whether there is any code in the onReady() function. Most of my pages have all different kinds of code (functions). But, here is an example on my Home Page which has no code but still throws the error:  
// For full API documentation, including code examples, visit [Velo Docs](http://wix.to/94BuAAs)

$w . onReady ( function () {  
});

What could possibly causing this error on every page??  
I also included a screenshot.

 ![](https://us1.discourse-cdn.com/wix/original/3X/d/a/da98037855667e774bbdbf54954f340c413d42b2.png)

---

<div class="post-metadata">

**Author:** ![farid-berrais](https://avatars.discourse-cdn.com/v4/letter/f/b9bd4f/32.png) [@farid-berrais](https://forum.wixstudio.com/u/farid-berrais)\
**Post date:** [December 31, 2021, 8:08pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/2 "2021-12-31T20:08:08Z")

</div>

Same problem in my website.  
onReady() doesn’t exist for $w elements… all pages…

---

<div class="post-metadata">

**Author:** ![reswebdev](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/reswebdev/32/31109_2.png) [@reswebdev](https://forum.wixstudio.com/u/reswebdev)\
**Post date:** [December 31, 2021, 8:10pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/3 "2021-12-31T20:10:25Z")

</div>

Having the same issue here. It seems to not be effecting the code though, just throwing an error.

![](https://us1.discourse-cdn.com/wix/original/3X/c/5/c55d72dfba90aac957144ca200cfbabec996fa7a.png)

---

<div class="post-metadata">

**Author:** ![farid-berrais](https://avatars.discourse-cdn.com/v4/letter/f/b9bd4f/32.png) [@farid-berrais](https://forum.wixstudio.com/u/farid-berrais)\
**Post date:** [December 31, 2021, 8:16pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/4 "2021-12-31T20:16:30Z")

</div>

it seems that this affects the code since it is unable to execute the scripts relating to onReady()…

---

<div class="post-metadata">

**Author:** ![murphyjaneway](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/murphyjaneway/32/30084_2.png) [@murphyjaneway](https://forum.wixstudio.com/u/murphyjaneway)\
**Post date:** [December 31, 2021, 8:40pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/5 "2021-12-31T20:40:49Z")

</div>

Me too - is there a fix in the works?

---

<div class="post-metadata">

**Author:** ![reswebdev](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/reswebdev/32/31109_2.png) [@reswebdev](https://forum.wixstudio.com/u/reswebdev)\
**Post date:** [December 31, 2021, 8:50pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/6 "2021-12-31T20:50:42Z")

</div>

@farid-berrais Ok I am seeing that now, my code is acting up.

---

<div class="post-metadata">

**Author:** ![farid-berrais](https://avatars.discourse-cdn.com/v4/letter/f/b9bd4f/32.png) [@farid-berrais](https://forum.wixstudio.com/u/farid-berrais)\
**Post date:** [January 1, 2022, 12:00am UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/7 "2022-01-01T00:00:55Z")

</div>

@reswebdev I think you are right.  
I have tested a number of functions relating to the onReady () function on several of my pages.  
I can see that the script works fine on my live website.  
Now remains to be seen why the function is identified as an error by the IDE …  
Can you confirm ?

---

<div class="post-metadata">

**Author:** ![email67727](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@email67727](https://forum.wixstudio.com/u/email67727)\
**Post date:** [January 1, 2022, 12:19am UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/8 "2022-01-01T00:19:03Z")

</div>

I starting having this issue too. It was fine at least till about 11:00 AM EST.

Property ’ onReady ’ does not exist on type ‘(selector: string) =\> any’.

Kindly resolve the issue. Thanks in advance for looking into this.

---

<div class="post-metadata">

**Author:** ![Certified\_Code](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/certified_code/32/80179_2.png) [@Certified\_Code](https://forum.wixstudio.com/u/Certified_Code)\
**Post date:** [January 1, 2022, 3:15am UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/9 "2022-01-01T03:15:57Z")

</div>

Ignore it.

It is just a validation bug, code still works.

---

<div class="post-metadata">

**Author:** ![fafifurnir](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/fafifurnir/32/24841_2.png) [@fafifurnir](https://forum.wixstudio.com/u/fafifurnir)\
**Post date:** [January 1, 2022, 9:05am UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/10 "2022-01-01T09:05:20Z")

</div>

It is just a validation bug, code still works. …  
Confirm !!!

---

<div class="post-metadata">

**Author:** ![eoofficecom](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/eoofficecom/32/27850_2.png) [@eoofficecom](https://forum.wixstudio.com/u/eoofficecom)\
**Post date:** [January 1, 2022, 10:48am UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/11 "2022-01-01T10:48:59Z")

</div>

As of this morning… code on masterpage.js is no longer working… and this cant be ignored…it actually not working. so codes for all page is not run

 ![](https://us1.discourse-cdn.com/wix/original/3X/2/f/2f211a6e90075055f981153eb3b8aa64c2b23992.png)  
ning

---

<div class="post-metadata">

**Author:** ![spandan-samiran](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/spandan-samiran/32/31471_2.png) [@spandan-samiran](https://forum.wixstudio.com/u/spandan-samiran)\
**Post date:** [January 1, 2022, 3:49pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/12 "2022-01-01T15:49:49Z")

</div>

i am also facing the same issue. Has any fix been proposed?

---

<div class="post-metadata">

**Author:** ![bebekiklimi](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bebekiklimi/32/31473_2.png) [@bebekiklimi](https://forum.wixstudio.com/u/bebekiklimi)\
**Post date:** [January 1, 2022, 3:57pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/13 "2022-01-01T15:57:35Z")

</div>

i am also facing the same issue. Has any fix been proposed?

---

<div class="post-metadata">

**Author:** ![juandelacruzpip360](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/juandelacruzpip360/32/19926_2.png) [@juandelacruzpip360](https://forum.wixstudio.com/u/juandelacruzpip360)\
**Post date:** [January 1, 2022, 5:01pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/14 "2022-01-01T17:01:51Z")

</div>

Same problem…  
I noticed also that:

1. event handlers does not work already

2. suggetion message when you code does not pop up anymore…

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [January 1, 2022, 5:43pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/15 "2022-01-01T17:43:07Z")

</div>

IMPORTANT! Please note:

Understand that this forum is not a support site, and is not monitored for bugs or system issues. Bugs and system issues should be reported to [Wix Customer Care](https://support.wix.com/en/article/contacting-wix-customer-care-for-support) to ensure timely handling of your issues.

I have notified the on call team regarding this issue - although I suspect that they know already.

---

<div class="post-metadata">

**Author:** ![lmacklin](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@lmacklin](https://forum.wixstudio.com/u/lmacklin)\
**Post date:** [January 1, 2022, 8:22pm UTC](https://forum.wixstudio.com/t/onready-function-throwing-error-on-every-page/347/16 "2022-01-01T20:22:10Z")

</div>

Thanks Yisrael. I just checked and it looks like Wix has fixed the bug.
