SDK Sample App does not compile

Description
The sample apps for your SDK don’t compile.

Error

> websdk-cdn@1.9.9 start /Users/mattmcd/Documents/sample-app-web/CDN
> set NODE_ENV=development && set BABEL_ENV=development && webpack serve --config webpack.config.dev.js

[webpack-cli] Unable to load '@webpack-cli/serve' command
[webpack-cli] TypeError: options.forEach is not a function
    at WebpackCLI.makeCommand (/Users/mattmcd/Documents/sample-app-web/CDN/node_modules/webpack-cli/lib/webpack-cli.js:108:21)
    at ServeCommand.apply (/Users/mattmcd/Documents/sample-app-web/CDN/node_modules/@webpack-cli/serve/lib/index.js:41:19)
    at loadCommandByName (/Users/mattmcd/Documents/sample-app-web/CDN/node_modules/webpack-cli/lib/webpack-cli.js:626:35)
    at Command.<anonymous> (/Users/mattmcd/Documents/sample-app-web/CDN/node_modules/webpack-cli/lib/webpack-cli.js:1091:23)
    at Command.listener [as _actionHandler] (/Users/mattmcd/Documents/sample-app-web/CDN/node_modules/webpack-cli/node_modules/commander/index.js:922:31)
    at Command._parseCommand (/Users/mattmcd/Documents/sample-app-web/CDN/node_modules/webpack-cli/node_modules/commander/index.js:1503:14)
    at Command.parse (/Users/mattmcd/Documents/sample-app-web/CDN/node_modules/webpack-cli/node_modules/commander/index.js:1292:10)
    at Command.parseAsync (/Users/mattmcd/Documents/sample-app-web/CDN/node_modules/webpack-cli/node_modules/commander/index.js:1318:10)
    at WebpackCLI.run (/Users/mattmcd/Documents/sample-app-web/CDN/node_modules/webpack-cli/lib/webpack-cli.js:1123:28)
    at runCLI (/Users/mattmcd/Documents/sample-app-web/CDN/node_modules/webpack-cli/lib/bootstrap.js:11:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! websdk-cdn@1.9.9 start: `set NODE_ENV=development && set BABEL_ENV=development && webpack serve --config webpack.config.dev.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the websdk-cdn@1.9.9 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!     /Users/mattmcd/.npm/_logs/2021-10-08T21_47_26_166Z-debug.log

Which Web Meeting SDK version?
1.9.9 - using the sample app found here: https://marketplace.zoom.us/docs/sdk/native-sdks/web#sample-apps

To Reproduce(If applicable)
Steps to reproduce the behavior:

git clone https://github.com/zoom/sample-app-web.git --branch master --depth 1
cd sample-app-web/Local
npm install
npm run start

The local nor the CDN app compile due to a webpack-cli error

Screenshots
If applicable, add screenshots to help explain your problem.

Device (please complete the following information):

  • Device: Mac
  • OS: 11.6
  • Node Version: 14.1.0

Additional context
Have tried this on two different devices and getting same issue. Should be fairly easy to reproduce.

Hey @mattmcd , thanks for sharing this with us.

Just checking, did the npm install succeed?

Thanks,
Tommy

@tommy I get the same error. npm install result below…

npm install

npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

npm WARN deprecated resolve-url@0.2.1: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.

npm WARN deprecated urix@0.1.0: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.

npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See There’s Math.random(), and then there’s Math.random() · V8 for details.

npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

added 508 packages, and audited 509 packages in 34s

29 packages are looking for funding

run npm fund for details

23 vulnerabilities (6 moderate , 17 high )

To address issues that do not require attention, run:

npm audit fix

To address all issues (including breaking changes), run:

npm audit fix --force

I tried running npm audit fix --force but still get the same error.

Hey @tommy , yes the npm install does succeed with the exception of a few WARN messages (a bit different than what Brendon is seeing:

npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN eslint-plugin-prettier@3.4.1 requires a peer of prettier@>=1.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN websdk-local@1.9.9 No repository field.

Have only included the WARN messages here.

Thanks @mattmcd , @brendonp ,

I was able to reproduce this error.

We will fix this as soon as we can.

In the meantime, you can use our Angular, React, or Vue sample apps:

-Tommy

1 Like

Thanks! Appreciate the speedy response!

1 Like

Happy to help, I will let you know when the issue is resolved. :slight_smile:

-Tommy

1 Like

Hi Tommy, we are facing the same issue, may I know is this issue resovle?

@thirtysevenedu just fyi, those other sample apps Tommy shared were actually quite informative and contained everything the regular sample app does for getting functionality to work. Would recommend checking those out!

Same problem. the webpack cli is old. Change to the latest and it works.

Hey @estim8d,

You can also try our latest version, 2.0.1 to see if that resolves your issue.

Thanks,
Max