Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Can not jsipfs npm package on mac os #3625

Closed
satoshi999 opened this issue Apr 15, 2021 · 2 comments
Closed

Can not jsipfs npm package on mac os #3625

satoshi999 opened this issue Apr 15, 2021 · 2 comments
Labels
need/analysis Needs further analysis before proceeding need/author-input Needs input from the original author topic/macos MacOS specific

Comments

@satoshi999
Copy link

satoshi999 commented Apr 15, 2021

I'm trying jsipfs. I understand that it is a library that completes node startup, network participation, and file transfer with only JavaScript.

I installed jsipfs.

$ npm install ipfs -g

Initialize & daemon

$ jsipfs daemon

Cat readme file. The content is exist.

$ jsipfs cat QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr/readme
Hello and Welcome to IPFS!

██╗██████╗ ███████╗███████╗
██║██╔══██╗██╔════╝██╔════╝
██║██████╔╝█████╗  ███████╗
██║██╔═══╝ ██╔══╝  ╚════██║
██║██║     ██║     ███████║
╚═╝╚═╝     ╚═╝     ╚══════╝

If you're seeing this, you have successfully installed
IPFS and are now interfacing with the ipfs merkledag!

 -------------------------------------------------------
| Warning:                                              |
|   This is alpha software. Use at your own discretion! |
|   Much is missing or lacking polish. There are bugs.  |
|   Not yet secure. Read the security notes for more.   |
 -------------------------------------------------------

Check out some of the other files in this directory:

  ./about
  ./help
  ./quick-start     <-- usage examples
  ./readme          <-- this file
  ./security-notes

Remove it from local cache.

$ jsipfs pin rm QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr
unpinned QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr
$ jsipfs block rm QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr
removed QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr

Try cat again. It is failed.

$ jsipfs cat QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr/readme
request to http://127.0.0.1:5002/api/v0/cat?arg=QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr%2Freadme failed, reason: socket hang up

The content is exist in gateway.

https://ipfs.io/ipfs/QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr

In other words, even though the file exists in the gateway, an error occurs if execute cat command , so I expect that the network cannot be connected or the file transfer is not working properly.
Why is that?
jsipfs can not work on mac os?

  • Mac OS Catalina 10.15.6
  • Node.js 14.16.1
@satoshi999 satoshi999 added the need/triage Needs initial labeling and prioritization label Apr 15, 2021
@lidel lidel added need/analysis Needs further analysis before proceeding topic/macos MacOS specific and removed need/triage Needs initial labeling and prioritization labels Jul 23, 2021
@achingbrain
Copy link
Member

@satoshi999 I can't replicate this with the latest version - could you please upgrade and try again?

If it's still not working, please start the daemon with debugging enabled before you try the jsipfs cat QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr/readme command:

$ DEBUG=ipfs* jsipfs daemon

Please then paste the last 50 lines or so of the debug output when you try to cat the file.

@hacdias hacdias added the need/author-input Needs input from the original author label Sep 1, 2021
@lidel
Copy link
Member

lidel commented Sep 10, 2021

Assuming no longer an issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need/analysis Needs further analysis before proceeding need/author-input Needs input from the original author topic/macos MacOS specific
Projects
No open projects
Archived in project
Development

No branches or pull requests

4 participants