TypeError: client.on is not a function, SDK won't initialize | Community
Skip to main content

TypeError: client.on is not a function, SDK won't initialize

  • June 29, 2023
  • 4 replies
  • 0 views

Yosef11

I don't think anything changed on my end and in the past 24h, I'm getting "TypeError: client.on is not a function". It seems "client" returns "false" after initialization ("ZAFClient.init();")

I see the same error even if I start from scratch in a fresh folder: (from ZD quick start guide)

"npx @zendesk/zcli apps:new"

I tried all major browsers with the same results.

Is there a known issue? I don't see anything on the status page

 

4 replies

Yosef11
  • Author
  • July 1, 2023

I now see there was an incident that seems related.

The error still show and I'm unable to develop my app


Yosef11
  • Author
  • July 1, 2023

Tipene
  • July 5, 2023

Hi @yosef11

I’ve tested the client.on method on my end and it appears to be functioning as expected. Are you initializing the ZAF client object before accessing the methods?


Yosef11
  • Author
  • July 6, 2023

Heya,

So it looks like the reason for the issue was that my npm/node version was outdated. Once updated, it got back to life.

Thanks,