# Unable to use zoom websdk, sample-web-app

**URL:** <https://devforum.zoom.us/t/unable-to-use-zoom-websdk-sample-web-app/15855>\
**Category:** Web\
**Created:** [May 3, 2020, 12:23pm UTC](https://devforum.zoom.us/t/unable-to-use-zoom-websdk-sample-web-app/15855 "2020-05-03T12:23:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shruti\_Kapoor](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shruti_kapoor/32/5466_2.png) [@Shruti\_Kapoor](https://devforum.zoom.us/u/Shruti_Kapoor)\
**Post date:** [May 3, 2020, 12:23pm UTC](https://devforum.zoom.us/t/unable-to-use-zoom-websdk-sample-web-app/15855/1 "2020-05-03T12:23:36Z")

</div>

**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](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](http://localhost:9999/index.html) --watch

ℹ ｢wds｣: Project is running at [http://0.0.0.0:9999/](http://0.0.0.0:9999/)  
ℹ ｢wds｣: webpack output is served from /static  
ℹ ｢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](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](http://localhost:9999/index.html)’,  
path: ‘[http://localhost:9999/index.html](http://localhost:9999/index.html)’,  
spawnargs: [‘[http://0.0.0.0:9999/](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

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 6, 2020, 8:11pm UTC](https://devforum.zoom.us/t/unable-to-use-zoom-websdk-sample-web-app/15855/2 "2020-05-06T20:11:41Z")

</div>

Hey @Shruti_Kapoor,

Can you show me how you are importing `ZoomMtg`?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![samadhan.madane31](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/samadhan.madane31/32/5466_2.png) [@samadhan.madane31](https://devforum.zoom.us/u/samadhan.madane31)\
**Post date:** [June 30, 2020, 7:57am UTC](https://devforum.zoom.us/t/unable-to-use-zoom-websdk-sample-web-app/15855/3 "2020-06-30T07:57:09Z")

</div>

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);
`

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 1, 2020, 6:18pm UTC](https://devforum.zoom.us/t/unable-to-use-zoom-websdk-sample-web-app/15855/4 "2020-07-01T18:18:04Z")

</div>

Hey @samadhan.madane31,

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

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![samadhan.madane31](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/samadhan.madane31/32/5466_2.png) [@samadhan.madane31](https://devforum.zoom.us/u/samadhan.madane31)\
**Post date:** [July 2, 2020, 4:24am UTC](https://devforum.zoom.us/t/unable-to-use-zoom-websdk-sample-web-app/15855/5 "2020-07-02T04:24:31Z")

</div>

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

 ![sample-app-web-error-while-npm-run-start](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/0/092765bf0e9835749c626ac97b9020110f3729e2.png)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 2, 2020, 9:11pm UTC](https://devforum.zoom.us/t/unable-to-use-zoom-websdk-sample-web-app/15855/6 "2020-07-02T21:11:54Z")

</div>

Hey @samadhan.madane31,

Can you see if this fixes it:

> [@Installing sample-app-web gives error](https://devforum.zoom.us/t/installing-sample-app-web-gives-error/12103/16):
>
> npm run start if directly run following command on terminal then it was working sudo webpack-dev-server --config webpack.config.dev.js --watch

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 10:33pm UTC](https://devforum.zoom.us/t/unable-to-use-zoom-websdk-sample-web-app/15855/7 "2020-08-21T22:33:12Z")

</div>

Closed on August 21, 2020, 10:33pm UTC


