But when I load my app, I get the following warnings and errors:
Method __esModule is not available in this version of Zoom Apps SDK and might not work correctly. Please, update your version of Zoom Apps SDK (app.bundle.js, line 78450)
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
TypeError: undefined is not a function (near '..._appssdk2.default.config...')"
Hmm okay. It is not obvious to me what might be causing it to error out on the frontend with those dependencies. If it is related to the CJS bug, then we plan to fix that sometime in the next couple of patch releases.
Has this been fixed? I’m getting a similar warning:
console.warn
Method __esModule is not available in this version of Zoom Apps SDK and might not work correctly. Please, update your version of Zoom Apps SDK
Everytime I import zoomSdk from "@zoom/appssdk"; when in jest tests, I am transpiling ts to js with ts-jest.
Sorry about this. We’re hoping to release a fix in September. For now, common js modules are not supported/ only ES6.
The work around for the moment is to use the CDN version of the Zoom Apps SDK, which is here: https://appssdk.zoom.us/sdk.js
This will add the zoomSdk as a global variable to the window. You can use a script tag (make sure it’s ahead of any JS app bundles you need), or some folks just copy and paste and ship this inline with their html
OK, Thanks, will be looking forward to the bug fix.
I do not want to add it using a script tag because - that way i am not getting the benefits of typescript when developing/running tsc. Also, we generate a index.html file in the build step, so adding the script tag there is more complicated than adding a dependency into our package.json
There is a typescript definitions file in the npm package you’ve downloaded; you might try copying that into your own project, & thereby take advantage of tsc. I haven’t tried this! Just a thought.
yes @ash.provost , we’re running typescript. It is happening only while running jest tests, we use babel-preset-react-app to transpile code from TS to JS while running those. I import it like this:
import zoomSdk, {
ConfigResponse,
GetMeetingUUIDResponse,
OnAuthorizedEvent,
} from "@zoom/appssdk";
The warning itself with some more information:
console.warn
Method __esModule is not available in this version of Zoom Apps SDK and might not work correctly. Please, update your version of Zoom Apps SDK
> 1 | import zoomSdk, {
| ^
2 | ConfigResponse,
3 | GetMeetingUUIDResponse,
4 | OnAuthorizedEvent,
at Object.get (../node_modules/@zoom/appssdk/dist/sdk.module.js:116:25)
at _interopRequireDefault (../node_modules/@babel/runtime/helpers/interopRequireDefault.js:2:21)
at Object.<anonymous> (src/zoomSdk/index.ts:1:1)