TypeError: appssdk_1.default.showNotification is not a function

I can’t seem to perform any calls using “@zoom1234/appssdk” that I installed using NPM.
Every function I try to do results in what’s being said in the title.
I’m using TypeScript if that could change something but I’m not even allowed to do the .config call. Another print that I’m also getting is: “Method default is not available in this version of Zoom Apps SDK and might not work correctly. Please update your version of Zoom Apps SDK”. The version that I have installed is 0.16.0 which from what I could see was the latest version.

How are you importing the sdk from the package? Does it look like this?

import zoomSdk from "@zoom/appssdk";

If you are using commonJS syntax it would look like this:

const zoomSdk = require(‘@zoom/appssdk’).default

But we anticipate problems with the commonJS approach as we have a bug to fix (which may be what you caught here).

1 Like

I’m importing it the following way

import zoomSdk from "@zoom/appssdk";

installed it the following way

npm install @zoom/appssdk

Can’t really see what the issue seems to be…

@15hannils what is the version of client you are working with? Can you show your code of how you instantiate the sdk?

Also, what are your build tools? Are you using Babel? If so, what is your configuration?

The code that I use

import zoomSdk from "@zoom/appssdk

const configResponse = await zoomSdk.config({
  capabilities: [
    "startCollaborate",
    "endCollaborate"
  ]
});
console.log(configResponse)

What I’m getting in console:

Method default is not available in this version of Zoom Apps SDK and might not work correctly. Please, update your version of Zoom Apps SDK
{"level":"info","message":"Handled request.","method":"GET","service":"zoom","statusCode":500,"time":62.1151,"timestamp":"2022-07-04T07:39:40.591+00:00","url":"/api/v1/event"}
TypeError: appssdk_1.default.config is not a function
    at event (/workspace/zoom/server/src/routes/event.ts:16:40)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

And the version I’m using is 0.16.0

I was trying to use the zoomSdk in the backend which resulted in the errors. Everything seemed to have worked normally when the SDK was used in the frontend.

1 Like

@15hannils I’m glad that you were able to catch the issue. I’ll go ahead and close this thread but feel free to reach out if you run into any further issues.