Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems on running this code and the demo app locally #203

Open
jaballogian opened this issue Jan 12, 2023 · 0 comments
Open

Problems on running this code and the demo app locally #203

jaballogian opened this issue Jan 12, 2023 · 0 comments

Comments

@jaballogian
Copy link

jaballogian commented Jan 12, 2023

Hello, I'm trying to create a web application using React JS that has a push-to-talk (PTT) feature on it.
One of the technologies that we will use is Mumble.

The demo (https://voice.johni0702.de/?address=voice.johni0702.de&port=443/demo) on this repository is working fine.
I tried to run the demo (this repository) on my local computer but got some different errors.

Installation Errors

I cloned and tried to install all of the libraries on the root folder of the repository using the npm install command on my local computer with Windows OS and Node JS v16 but I got this error below.

verbose stack Error: command failed
verbose stack     at ChildProcess.<anonymous> (C:\Users\LENOVO\AppData\Roaming\nvm\v16.18.0\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:63:27)
verbose stack     at ChildProcess.emit (node:events:513:28)
verbose stack     at maybeClose (node:internal/child_process:1100:16)
verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
verbose pkgid mumble-client-websocket@1.0.0
verbose cwd C:\Users\LENOVO\AppData\Local\npm-cache\_cacache\tmp\git-cloneZtPlJ2
verbose Windows_NT 10.0.22621
verbose node v16.18.0
verbose npm  v8.19.2
error code 1
error path C:\Users\LENOVO\AppData\Local\npm-cache\_cacache\tmp\git-cloneZtPlJ2
error command failed
error command C:\WINDOWS\system32\cmd.exe /d /s /c npm run compile
verbose exit 1
timing npm Completed in 8638ms
verbose code 1

Then I switched the Node JS version using the NVM from v16 to v14.
I tried to install all of the libraries on this repository using the npm install command again but then got another different error.

verbose stack Error: mumble-web@0.5.1 prepare: `rm -rf dist && npm run build`
verbose stack Exit status 1
verbose stack     at EventEmitter.<anonymous> (C:\Users\LENOVO\AppData\Roaming\nvm\v14.21.2\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
verbose stack     at EventEmitter.emit (events.js:400:28)
verbose stack     at ChildProcess.<anonymous> (C:\Users\LENOVO\AppData\Roaming\nvm\v14.21.2\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
verbose stack     at ChildProcess.emit (events.js:400:28)
verbose stack     at maybeClose (internal/child_process.js:1088:16)
verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
verbose pkgid mumble-web@0.5.1
verbose cwd D:\A.ing\Works\Others\Lacak-and-Valid\Exercises\React-Js\mumble-web-2
verbose Windows_NT 10.0.22621
verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i"
verbose node v14.21.2
verbose npm  v6.14.17
error code ELIFECYCLE
error errno 1
error mumble-web@0.5.1 prepare: `rm -rf dist && npm run build`
error Exit status 1
error Failed at the mumble-web@0.5.1 prepare script.
error This is probably not a problem with npm. There is likely additional logging output above.
verbose exit [ 1, true ]

I tried to delete the "prepare": "rm -rf dist && npm run build", code (line 45) on the package.json file.
I didn't know whether deleting the code would have an impact on running the app later or not.
I also searched on the internet and found this answer https://stackoverflow.com/a/62744648/8339172 to clear the npm cache, regenerate the package-lock.json file, and delete the node_modules folder.
I did all of them then I ran the "npm install" command again.

This time, there was no error.

Runtime Errors

Continuing the previous section, I tried to run the root of the repository by running the npm run watch command.
I didn't know whether this was correct or not because I usually enter the npm start command to run a React JS locally.
I didn't see any port configured on the package.json file so I opened the localhost:8080 address on my browser.
Unfortunately, there was nothing there. The browser said This site can’t be reached. localhost refused to connect.

The App Folder

Continuing the previous section, I tried to run the index.html file on the app folder by double-clicking on the file.
It seemed that the app crashed because I saw there was an error on the browser console as seen in this screenshot below.
image
Here is the error message:

Uncaught SyntaxError: Cannot use import statement outside a module (at index.js:1:1)

Questions

I want to learn how to create the demo (https://voice.johni0702.de/?address=voice.johni0702.de&port=443/demo) on this repository. My questions are:

  1. Which one is the source code of the demo app? Is it from the root folder of this repository or the app folder?
  2. Continuing the first question, how to install all of the required dependencies for the demo app locally?
  3. Continuing the first and second questions, how to run the demo app locally?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant