Unable to use zoom websdk, sample-web-app

Description
I am trying to use the Zoom web sdk, I have node 12.16.3. I followed hte instructions in,
https://marketplace.zoom.us/docs/sdk/native-sdks/web/reference
Basically, clone, npm install and npm run start.

On the other hand, I tried writing a sample app on my own and I get this in the browser console log
“Uncaught SyntaxError: Cannot use import statement outside a module”
— above error is referencing “import { ZoomMtg } from ‘@zoomus/websdk’;”

Error
$ npm -v
6.14.4
$ node -v
v12.16.3
$ npm run start

websdk-local@1.7.6 start /home/srikar/workspace/external/sample-app-web/Local
set NODE_ENV=development && set BABEL_ENV=development && webpack-dev-server --config webpack.config.dev.js --https false --open http://localhost:9999/index.html --watch

:information_source: 「wds」: Project is running at http://0.0.0.0:9999/
:information_source: 「wds」: webpack output is served from /static
:information_source: 「wds」: Content not from webpack is served from /home/srikar/workspace/external/sample-app-web/Local
events.js:287
throw er; // Unhandled ‘error’ event
^

Error: spawn http://localhost:9999/index.html ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted ‘error’ event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: ‘ENOENT’,
code: ‘ENOENT’,
syscall: ‘spawn http://localhost:9999/index.html’,
path: ‘http://localhost:9999/index.html’,
spawnargs: [ ‘http://0.0.0.0:9999/’ ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! websdk-local@1.7.6 start: set NODE_ENV=development && set BABEL_ENV=development && webpack-dev-server --config webpack.config.dev.js --https false --open http://localhost:9999/index.html --watch
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the websdk-local@1.7.6 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/srikar/.npm/_logs/2020-05-03T12_16_59_247Z-debug.log
srikar@laptop:~/workspace/external/sample-app-web/Local$

Which version?
zoom/websdk version. 1.7.6

OS: Ubuntu 18.04

Hey @Shruti_Kapoor,

Can you show me how you are importing ZoomMtg?

Thanks,
Tommy

I’m also facing the same issue with zoom sample-app-web…
I’m using zoom web sdk 1.7.9 - implementing local version

here is my meeting.js

import { ZoomMtg } from “@zoomus/websdk”;
const testTool = window.testTool;
// get meeting args from url
const tmpArgs = testTool.parseQuery();
const meetingConfig = {
apiKey: tmpArgs.apiKey,
meetingNumber: tmpArgs.mn,
userName: (function () {
if (tmpArgs.name) {
try {
return testTool.b64DecodeUnicode(tmpArgs.name);
} catch (e) {
return tmpArgs.name;
}
}
return (
“CDN#” +
tmpArgs.version +
“#” +
testTool.detectOS() +
“#” +
testTool.getBrowserInfo()
);
})(),
passWord: tmpArgs.pwd,
leaveUrl: “/index.html”,
role: parseInt(tmpArgs.role, 10),
userEmail: (function () {
try {
return testTool.b64DecodeUnicode(tmpArgs.email);
} catch (e) {
return tmpArgs.email;
}
})(),
lang: tmpArgs.lang,
signature: tmpArgs.signature || “”,
china: tmpArgs.china === “1”,
};

console.log(JSON.stringify(ZoomMtg.checkSystemRequirements()));

// it’s option if you want to change the WebSDK dependency link resources. setZoomJSLib must be run at first
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
function beginJoin(signature) {
ZoomMtg.init({
leaveUrl: meetingConfig.leaveUrl,
webEndpoint: meetingConfig.webEndpoint,
success: function () {
console.log(meetingConfig);
console.log(“signature”, signature);
$.i18n.reload(meetingConfig.lang);
ZoomMtg.join({
meetingNumber: meetingConfig.meetingNumber,
userName: meetingConfig.userName,
signature: signature,
apiKey: meetingConfig.apiKey,
userEmail: meetingConfig.userEmail,
passWord: meetingConfig.passWord,
success: function (res) {
console.log(“join meeting success”);
console.log(“get attendeelist”);
ZoomMtg.getAttendeeslist({});
ZoomMtg.getCurrentUser({
success: function (res) {
console.log(“success getCurrentUser”, res.result.currentUser);
},
});
},
error: function (res) {
console.log(res);
},
});
},
error: function (res) {
console.log(res);
},
});
}

beginJoin(meetingConfig.signature);

Hey @samadhan.madane31,

Please provide what the error is and what steps I can take to reproduce the issue.

Thanks,
Tommy

Following is the error, I’m getting while npm run start

Hey @samadhan.madane31,

Can you see if this fixes it:

Thanks,
Tommy