Npm run start - not working

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:

"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:

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

Which Web Video SDK version?
1.0.2, downloaded today

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

Screenshots

Device (please complete the following information):

  • OS: Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-1112-aws x86_64)

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.

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/.

2 Likes

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.

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

2 Likes

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

@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:

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?

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

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

2 Likes

:joy: 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.

2 Likes

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

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

-Tommy

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