Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Install and Usage code for js-libp2p-webrtc-star #431

Open
Annamarie2019 opened this issue May 17, 2022 · 5 comments
Open

Install and Usage code for js-libp2p-webrtc-star #431

Annamarie2019 opened this issue May 17, 2022 · 5 comments
Labels
P3 Low: Not priority right now status/in-progress In progress

Comments

@Annamarie2019
Copy link

Annamarie2019 commented May 17, 2022

For js-libp2p-webrtc-star-signalling-server, there are 3 issues:

  • The code, > npm install -g @libp2p/webrtc-star-signalling-server copies the > sign, so you'll get a message about Usage untill the user realizes the > got copied and removes it. Better to not include the >
  • Once you realize the problem and run the code, you get a permissions error. (see image)
  • The code,$ webrtc-star --port=13579 --host=127.0.0.1 ... same problem as above: copies the $

Screen Shot 2022-05-17 at 11 04 38 AM

Screen Shot 2022-05-17 at 11 06 08 AM

I'm already logged in as Admin.

Here's the end of the log, where the error shows up:
Screen Shot 2022-05-17 at 11 38 44 AM

@johnnymatthews
Copy link

Those instructions leave out the fact that you've got to clone the repository, cd into the correct folder, and then run those commands (without the > and $).

Here's what I did (> denotes the output from each command):

  1. Clone the repo:

    git clone https://github.com/libp2p/js-libp2p-webrtc-star.git
    
    
    > Cloning into 'js-libp2p-webrtc-star'...
    > remote: Enumerating objects: 2665, done.
    > remote: Counting objects: 100% (629/629), done.
    > remote: Compressing objects: 100% (257/257), done.
    
    > remote: Total 2665 (delta 420), reused 542 (delta 361), pack-reused 2036
    > Receiving objects: 100% (2665/2665), 1.66 MiB | 9.42 MiB/s, done.
    > Resolving deltas: 100% (1617/1617), done.
  2. Move into the directory:

    cd js-libp2p-webrtc-star
  3. Install the local @libp2p package:

    npm nstall -g @libp2p/webrtc-star-signalling-server
    
    
    > added 82 packages, and audited 83 packages in 7s
    > 
    > 2 packages are looking for funding
    >   run `npm fund` for details
    > 
    > found 0 vulnerabilities
  4. Start the webrtc server:

    webrtc-star --port=13579 --host=127.0.0.1
    
    > @libp2p/[email protected]
    > Listening on: http://127.0.0.1:13579

@Annamarie2019
Copy link
Author

Thanks, @johnnymatthews I was able to execute 1 and 2, but I got a permissions error again on 3. (Also, please note typo in "nstall")
Error1
Logs 2022-05-17 at 9 08 18 PM

I think I need permissions to libp2p.

@johnnymatthews
Copy link

johnnymatthews commented May 24, 2022

No, this isn't a libp2p issue. If it were, we'd be seeing errors from git. It looks like your NPM installation has some funky issues going on. I'd recommend completely uninstalling NPM, and then installing NVM, and managing your NPM installations that way.

@wemeetagain
Copy link
Member

Those instructions leave out the fact that you've got to clone the repository, cd into the correct folder, and then run those commands (without the > and $).

Here's what I did (> denotes the output from each command):

1. Clone the repo:
   ```shell
   git clone https://github.com/libp2p/js-libp2p-webrtc-star.git
   
   
   > Cloning into 'js-libp2p-webrtc-star'...
   > remote: Enumerating objects: 2665, done.
   > remote: Counting objects: 100% (629/629), done.
   > remote: Compressing objects: 100% (257/257), done.
   
   > remote: Total 2665 (delta 420), reused 542 (delta 361), pack-reused 2036
   > Receiving objects: 100% (2665/2665), 1.66 MiB | 9.42 MiB/s, done.
   > Resolving deltas: 100% (1617/1617), done.
   ```

2. Move into the directory:
   ```shell
   cd js-libp2p-webrtc-star
   ```

3. Install the local `@libp2p` package:
   ```shell
   npm nstall -g @libp2p/webrtc-star-signalling-server
   
   
   > added 82 packages, and audited 83 packages in 7s
   > 
   > 2 packages are looking for funding
   >   run `npm fund` for details
   > 
   > found 0 vulnerabilities
   ```

4. Start the webrtc server:
   ```shell
   webrtc-star --port=13579 --host=127.0.0.1
   
   > @libp2p/[email protected]
   > Listening on: http://127.0.0.1:13579
   ```

Hi @johnnymatthews , thanks for finding shortcomings in the docs
would you be willing to make a PR that makes the instructions in the README better? 🙏 🙏

@johnnymatthews
Copy link

@wemeetagain, for sure! Here's a PR: #435

@mpetrunic mpetrunic linked a pull request Jun 14, 2022 that will close this issue
@mpetrunic mpetrunic added the status/in-progress In progress label Jun 14, 2022
@BigLep BigLep added the P3 Low: Not priority right now label Sep 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 Low: Not priority right now status/in-progress In progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants