# Npm run start - not working

**URL:** <https://devforum.zoom.us/t/npm-run-start-not-working/48657>\
**Category:** Web\
**Created:** [April 22, 2021, 9:40pm UTC](https://devforum.zoom.us/t/npm-run-start-not-working/48657 "2021-04-22T21:40:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![cscav](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cscav/32/26284_2.png) [@cscav](https://devforum.zoom.us/u/cscav)\
**Post date:** [April 22, 2021, 9:40pm UTC](https://devforum.zoom.us/t/npm-run-start-not-working/48657/1 "2021-04-22T21:40:04Z")

</div>

**Description**  
Everything works well locally. But not when I try the same steps on my server. It just hangs at:  
_Starting the development server…_

Note: I have other Node servers running on ports 3000/3001, so I changed the SampleApp to 3006 in **package.json** :

```auto
"scripts": {
  "start": "export PORT=3006 && react-app-rewired start",
  ...
}

```

But this didn’t make a difference. I also tried NOT changing the port, and entering ‘yes’ when prompted with the Terminal warning `"It looks like another app is using this port. Would you like to use a different one?"` Same thing…it just hangs at “Starting the development server”.

Any suggestions?

For what it’s worth, I’m only trying to run the SampleApp so that is generates the required files for me to create a standalone bundle, as the wonderful **bekit** described here:

> [@Is there an HTML sample for the SDK that uses either local or CDN resources?](https://devforum.zoom.us/t/is-there-an-html-sample-for-the-sdk-that-uses-either-local-or-cdn-resources/42980/8):
>
> Sure thing. First thing I did was get the sample app in the web video sdk working (following all of the steps to npm install and copy over the @zoomus folder, etc.). Once I had that working, I installed [Browserify](http://browserify.org/) globally. Then I created a simple file that would bring in the instantsdk source. For an example, let’s call it main.js. Place this in the root of the Sample folder. This file just had one line in it: global.ZoomInstant = require("@zoomus/instantsdk"); Then run browserify on it: b…

**Additional notes:**  
While it’s hanging, my site stops serving page requests until I close the terminal window 😳

**Which Web Video SDK version?**  
1.0.2, downloaded today

**To Reproduce(If applicable)**  
`npm run start` as described in SampleApp instructions

**Screenshots**

 ![Screen Shot 2021-04-22 at 5.18.07 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/d/2d33349989f73d59df12b53d00d79ac71d03a579.jpeg)

**Device (please complete the following information):**

- OS: Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-1112-aws x86\_64)

---

<div class="post-metadata">

**Author:** ![bekit](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bekit/32/26056_2.png) [@bekit](https://devforum.zoom.us/u/bekit)\
**Post date:** [April 22, 2021, 10:27pm UTC](https://devforum.zoom.us/t/npm-run-start-not-working/48657/2 "2021-04-22T22:27:39Z")

</div>

For what it’s worth, I don’t think you actually have to run it to get the files that you need. As long as you can get the npm install to work and copy over the `@zoomus` folder, browserify may still work.

One thing to confirm is that you are using Node 14. Apparently newer versions won’t work.

---

<div class="post-metadata">

**Author:** ![bekit](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bekit/32/26056_2.png) [@bekit](https://devforum.zoom.us/u/bekit)\
**Post date:** [April 22, 2021, 10:39pm UTC](https://devforum.zoom.us/t/npm-run-start-not-working/48657/3 "2021-04-22T22:39:38Z")

</div>

I just tested it out and it does seem to work.

```
unzip ../zoom-instant-sdk-web-1.0.2.zip
cd zoom-instant-sdk-web-1.0.2/Sample/
npm install
cp -r @zoomus node_modules/
echo 'global.ZoomInstant = require("@zoomus/instantsdk");' > main.js
browserify main.js -o zoomus-instantsdk.js

```

That gave me exactly the same output as one that had browserify run after `npm run start`.

The library files that you need to host and point to are under `zoom-instant-sdk-web-1.0.2/Sample/@zoomus/instantsdk/dist/lib/`.

---

<div class="post-metadata">

**Author:** ![cscav](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cscav/32/26284_2.png) [@cscav](https://devforum.zoom.us/u/cscav)\
**Post date:** [April 22, 2021, 10:45pm UTC](https://devforum.zoom.us/t/npm-run-start-not-working/48657/4 "2021-04-22T22:45:35Z")

</div>

Ohh you rock! Your other post mentioned the `Sample/public/lib` folder (which does exist for me locally but not on the server), but I guess this is probably just copied from `1.0.2/Sample/@zoomus/instantsdk/dist/lib/` upon **npm run start**?

Anyways…I will try this tonight and report back, hopefully confirming success.

---

<div class="post-metadata">

**Author:** ![cscav](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cscav/32/26284_2.png) [@cscav](https://devforum.zoom.us/u/cscav)\
**Post date:** [April 23, 2021, 1:41am UTC](https://devforum.zoom.us/t/npm-run-start-not-working/48657/5 "2021-04-23T01:41:06Z")

</div>

**Update:** You were correct, all is working now. Thanks a million @bekit

---

<div class="post-metadata">

**Author:** ![cscav](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cscav/32/26284_2.png) [@cscav](https://devforum.zoom.us/u/cscav)\
**Post date:** [April 23, 2021, 8:17pm UTC](https://devforum.zoom.us/t/npm-run-start-not-working/48657/6 "2021-04-23T20:17:41Z")

</div>

**Update:** I jumped the gun when I said “all is working now”.

Last night I only confirmed I got no console errors on page load, and that ZoomInstant was defined with calls such as **ZoomInstant.createClient()** exposed.

Now that I’m trying to connect two users to a session, I am getting errors that **JsMediaSDK\_Instance** isn’t defined:  
 ![Screen Shot 2021-04-23 at 3.51.59 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/3/2344f5bdafe31038eb1b06ad7e7399afee12453c.jpeg)

@bekit Did you go as far as connecting two users to a session when you tested yesterday?

It seems the error is occurring in the following code:

```auto
init() {
 if (!this.instance) {
    const e = {
      ivObj: {
        [Xo.AUDIO_ENCODE]: No.get(ni) && No.get(ni)[Xo.AUDIO_ENCODE],
        [Xo.VIDEO_ENCODE]: No.get(ni) && No.get(ni)[Xo.VIDEO_ENCODE],
        [Xo.SHARING_ENCODE]: No.get(ni) && No.get(ni)[Xo.SHARING_ENCODE]
      }
    };
    this.instance = new JsMediaSDK_Instance(e), this.instance.setRWGAgent(Uo.createAgent());
  }
}

```

^That code is located in `zoom-instant-sdk-web-1.0.2/Sample/dist/static/js/vendors~main.chunk.js` (line 68415).  
I confirmed it’s also minified in my browserify output file, but `...Sample/dist/` is one of the paths created upon **npm run start** (therefore I don’t have it on server) so I wonder if that’s related at all…

Any advice on where **JsMediaSDK\_Instance** is defined / how to reference it without building the Sample app?

---

<div class="post-metadata">

**Author:** ![cscav](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cscav/32/26284_2.png) [@cscav](https://devforum.zoom.us/u/cscav)\
**Post date:** [April 23, 2021, 8:52pm UTC](https://devforum.zoom.us/t/npm-run-start-not-working/48657/7 "2021-04-23T20:52:17Z")

</div>

Haha, my bad. I had a trailing / in my lib path, as @bekit had described specifying here:

> [@Is there an HTML sample for the SDK that uses either local or CDN resources?](https://devforum.zoom.us/t/is-there-an-html-sample-for-the-sdk-that-uses-either-local-or-cdn-resources/42980/8):
>
> In addition, you have to take the `public/lib` folder and host it somewhere accessible (until the CDN is available). When you do your `init` , you have to pass this location. For example:
> 
> ```auto
> zoomClient = ZoomInstant.createClient();
> await zoomClient.init("en-US", `${window.location.origin}/path/to/lib`);
> 
> ```

Of course, the idea to double-check this path came to me in the shower, where all the best lightbulb ideas occur…

---

<div class="post-metadata">

**Author:** ![bekit](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bekit/32/26056_2.png) [@bekit](https://devforum.zoom.us/u/bekit)\
**Post date:** [April 23, 2021, 9:29pm UTC](https://devforum.zoom.us/t/npm-run-start-not-working/48657/8 "2021-04-23T21:29:23Z")

</div>

> [@cscav](#):
>
> Of course, the idea to double-check this path came to me in the shower, where all the best lightbulb ideas occur

😂 Glad you got it figgured out. That was going to be my first guess as well since I got some weird errors until I got my the lib pathing figured out originally.

---

<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:** [April 23, 2021, 11:48pm UTC](https://devforum.zoom.us/t/npm-run-start-not-working/48657/9 "2021-04-23T23:48:56Z")

</div>

Thanks for sharing the solution here @bekit ! 🙂 We appreciate your contributions to the community!

@cscav , if you experience any additional issues, please let us know!

-Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 24, 2021, 9:48am UTC](https://devforum.zoom.us/t/npm-run-start-not-working/48657/10 "2021-05-24T09:48:59Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
