ZoomMtgEmbedded fails in nextjs on 'npm run build'

Meeting SDK Type and Version
@zoomus/websdk@2.12.2

Description
Just trying to get embedded Zoom meeting working on vercel deployment.

Error?
const client = ZoomMtgEmbedded.createClient(); works on npm run dev
But when i run npm run build there seems to be some kind of compilation issue:

Uncaught SyntaxError: redeclaration of var fL[e8abbd19-b0414c27380d1727.js:67:49737](http://localhost:3000/_next/static/chunks/e8abbd19-b0414c27380d1727.js)note: Previously declared at line 67, column 49679

Troubleshooting Routes
Honestly not sure. Tried firefox and chrome. Feels like a library issue. Can’t even unused ZoomMtgEmbedded in my code (like unused function)

How To Reproduce

  1. (node and npm) then npx create-next-app my-next-app
  2. Add a dynamic import in /app/page.tsx: (to render it client side)
import Image from 'next/image'
import styles from './page.module.css'
import dynamic from 'next/dynamic';
const ZoomComponent = dynamic(() => import('./zoomComponent'), { ssr: false });

export default function Home() {
  return (
    <main className={styles.main}>
      <div className={styles.description}>
      < ZoomComponent />
  1. Create ZoomMtgEmbedded:
"use client"
import ZoomMtgEmbedded from "@zoomus/websdk/embedded";
import { useEffect } from "react";


const ZoomComponent = () => {
    useEffect(()=> {
        const fetchData = async () => {
            try {
                ZoomMtgEmbedded.createClient()
                console.log("VERSION:", ZoomMtgEmbedded.VERSION)
            } catch (error) {
                console.error("Error fetching user profile:", error);
            }
            };
        fetchData();

        return () => {
          // Cleanup or disconnect logic if needed
        };
      }, []);
    //console.log(ZoomMtgEmbedded.VERSION)
  return (
    <div>
    </div>
  );
};

export default ZoomComponent;
  1. npm run build
  2. npm run start
  3. You should see the error on the console:
    Uncaught SyntaxError: redeclaration of var fL[e8abbd19-b0414c27380d1727.js:67:49737](http://localhost:3000/_next/static/chunks/e8abbd19-b0414c27380d1727.js)note: Previously declared at line 67, column 49679
1 Like

@bodrul ,
Sorry for not getting back to you sooner. We sincerely apologize for any inconvenience caused. We wanted to reach out and see if the issue you mentioned is still persisting. Rest assured, we are more than happy to lend a hand in diagnosing, troubleshooting, and finding a solution for you. We understand how frustrating technical issues can be, and we’re here to support you every step of the way. Please don’t hesitate to let us know if there’s anything else we can do to assist you. We’re committed to providing the best possible assistance and ensuring your satisfaction.

Thank you for your patience, and we look forward to hearing from you!