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

There was a problem when I executed npm install go-ipfs #5883

Closed
zcyzhu opened this issue Jan 2, 2019 · 13 comments
Closed

There was a problem when I executed npm install go-ipfs #5883

zcyzhu opened this issue Jan 2, 2019 · 13 comments

Comments

@zcyzhu
Copy link

zcyzhu commented Jan 2, 2019

(1).I executednpm install go-ipfsand something went wrong.

Downloading https://dist.ipfs.io/go-ipfs/v0.4.18/go-ipfs_v0.4.18_linux-amd64.tar.gz
Error: connect ECONNREFUSED 69.171.248.65:443
Download failed!

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! go-ipfs-dep@0.4.18 install: `node src/bin.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the go-ipfs-dep@0.4.18 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zcy/.npm/_logs/2019-01-02T11_12_37_683Z-debug.log

(2).I want to perform an IPFS performance test on https://github.com/ipfs/ipfs-performance-profiling, which occurs when npm install is executed:

/home/zcy/ipfs-performance-profiling/node_modules/go-ipfs-dep/src/index.js:102
      if (res.statusCode !== 200) {
              ^

TypeError: Cannot read property 'statusCode' of undefined
    at Request.request.get [as _callback] (/home/zcy/ipfs-performance-profiling/node_modules/go-ipfs-dep/src/index.js:102:15)
    at self.callback (/home/zcy/ipfs-performance-profiling/node_modules/request/request.js:185:22)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at Request.onRequestError (/home/zcy/ipfs-performance-profiling/node_modules/request/request.js:881:8)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! go-ipfs-dep@0.4.7 install: `node src/bin.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the go-ipfs-dep@0.4.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zcy/.npm/_logs/2019-01-02T10_58_25_571Z-debug.log

(3)I want to combine Ethereum and IPFS, but I chose the image in Dapp. When I click send, I didn't get the IPFS hash value. I used ganache-cli as the test chain, but metaMask didn't respond when I sent a image in Dapp
_ p 0 x5zk w1wci3 acob8
csff0hl_uxaxuxp 7g si 4
What is the reason for this? I always feel that this problem may be the same as the first two problems. I can only ask you now, thank you for answering these questions.
Some people say that it is a proxy problem. Some people say that it is a firewall. Some people say that it is a metaMask version. I am running on Linux. I feel that there may be a problem with the IPFS connection. I am using ubuntu, I don't know if it is a network configuration problem. I don't know how to solve it.

@eingenito
Copy link
Contributor

Hey @zcyzhu - it's tricky for us to help troubleshoot your problems. 1 and 2 seem to be network connectivity related. 3 could also be a connectivity problem - it's difficult to tell. go-ipfs issues are for reporting bugs or requesting features in go-ipfs, and therefore your questions are going to the wrong audience. My best suggestion is trying the IPFS discussion forums at https://discuss.ipfs.io/. Good luck.

@Stebalien
Copy link
Member

I assume you're in China. Unfortunately, the GFW blocks dist.ipfs.io.

I'm not sure about the second two issues but they're probably because you weren't able to correctly install the go-ipfs dependency.

@zcyzhu
Copy link
Author

zcyzhu commented Jan 3, 2019

@eingenito@Stebalien ,how can I solve it, can you tell me specifically?

@Stebalien
Copy link
Member

Use a proxy or a VPN? Alternatively, you can:

  1. Find a working gateway with: https://ipfs.github.io/public-gateway-checker/
  2. Set the environment variable GO_IPFS_DIST_URL to "https://SOME_WORKING_GATEWAY/ipns/dist.ipfs.io"

That will allow you to download IPFS from a different gateway.

@zcyzhu
Copy link
Author

zcyzhu commented Jan 7, 2019

Thank you, thank you very much for your help, you will need your help in the future.

@zcyzhu
Copy link
Author

zcyzhu commented Jan 13, 2019

@Stebalien,Can you be more specific? I found a gateway such as: https://ipfs.infura.io/ipfs/Qmaisz6NMhDB51cCvNWa1GMS7LU1pAxdF4Ld6Ft9kZEP2a, how do I use it?
How do I set the environment variable GO_IPFS_DIST_URL to "https://SOME_WORKING_GATEWAY/ipns/dist.ipfs.io" .Thanks

@Stebalien
Copy link
Member

That depends on your operating system. On everything but windows, you should be able to run: GO_IPFS_DIST_URL="https://ipfs.infura.io/ipns/dist.ipfs.io" npm install go-ipfs

@zcyzhu
Copy link
Author

zcyzhu commented Jan 14, 2019

@Stebalien ,I am running npm install at https://github.com/ipfs/ipfs-performance-profiling or I am getting an error.

home/zcy/ipfs-performance-profiling/node_modules/go-ipfs-dep/src/index.js:102
      if (res.statusCode !== 200) {
              ^

TypeError: Cannot read property 'statusCode' of undefined
    at Request.request.get [as _callback] (/home/zcy/ipfs-performance-profiling/node_modules/go-ipfs-dep/src/index.js:102:15)
    at self.callback (/home/zcy/ipfs-performance-profiling/node_modules/request/request.js:185:22)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at Request.onRequestError (/home/zcy/ipfs-performance-profiling/node_modules/request/request.js:881:8)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! go-ipfs-dep@0.4.7 install: `node src/bin.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the go-ipfs-dep@0.4.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I want to cry.Is there any other way to test IPFS performance?To add, I have previously installed IPFS version 0.4.18. Should I uninstall the previous version?

@Stebalien
Copy link
Member

If you specified a working gateway with GO_IPFS_DIST_URL and it's still not working, I have no idea what's going on and no idea where to start debugging.

@zcyzhu
Copy link
Author

zcyzhu commented Jan 15, 2019

@Stebalien ,I am a student, so I need your help.Sorry to bother you again, but I can't get help except here.

zcy@ubuntu:~/ipfs-performance-profiling$ GO_IPFS_DIST_URL="https://hardbin.com/ipns/dist.ipfs.io/"
zcy@ubuntu:~/ipfs-performance-profiling$ npm install
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

> go-ipfs-dep@0.4.7 install /home/zcy/ipfs-performance-profiling/node_modules/go-ipfs-dep
> node src/bin.js

Downloading https://dist.ipfs.io/go-ipfs/v0.4.7/go-ipfs_v0.4.7_linux-amd64.tar.gz
/home/zcy/ipfs-performance-profiling/node_modules/go-ipfs-dep/src/index.js:102
      if (res.statusCode !== 200) {
              ^

TypeError: Cannot read property 'statusCode' of undefined
    at Request.request.get [as _callback] (/home/zcy/ipfs-performance-profiling/node_modules/go-ipfs-dep/src/index.js:102:15)
    at self.callback (/home/zcy/ipfs-performance-profiling/node_modules/request/request.js:185:22)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at Request.onRequestError (/home/zcy/ipfs-performance-profiling/node_modules/request/request.js:881:8)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! go-ipfs-dep@0.4.7 install: `node src/bin.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the go-ipfs-dep@0.4.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zcy/.npm/_logs/2019-01-15T01_37_13_237Z-debug.log

I used the gateway in your way, but why the website is still downloaded from Downloading https://dist.ipfs.io/go-ipfs/v0.4.7/go-ipfs_v0.4.7_linux-amd64.tar.gz

@zcyzhu
Copy link
Author

zcyzhu commented Jan 15, 2019

@Stebalien ,The great teacher, I succeeded, thank you for your guidance, my last problem was finally solved, and many methods were useless before.

Downloading https://hardbin.com/ipns/dist.ipfs.io//go-ipfs/v0.4.7/go-ipfs_v0.4.7_linux-amd64.tar.gz
/home/zcy/ipfs-performance-profiling/node_modules/go-ipfs-dep/src/index.js:102
      if (res.statusCode !== 200) {
              ^

TypeError: Cannot read property 'statusCode' of undefined
    at Request.request.get [as _callback] (/home/zcy/ipfs-performance-profiling/node_modules/go-ipfs-dep/src/index.js:102:15)
    at self.callback (/home/zcy/ipfs-performance-profiling/node_modules/request/request.js:185:22)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at Request.onRequestError (/home/zcy/ipfs-performance-profiling/node_modules/request/request.js:881:8)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! go-ipfs-dep@0.4.7 install: `node src/bin.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the go-ipfs-dep@0.4.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zcy/.npm/_logs/2019-01-15T09_21_59_256Z-debug.log
zcy@ubuntu:~/ipfs-performance-profiling$  GO_IPFS_DIST_URL=https://hardbin.com/ipns/dist.ipfs.io npm install
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

> go-ipfs-dep@0.4.7 install /home/zcy/ipfs-performance-profiling/node_modules/go-ipfs-dep
> node src/bin.js

Downloading https://hardbin.com/ipns/dist.ipfs.io/go-ipfs/v0.4.7/go-ipfs_v0.4.7_linux-amd64.tar.gz
Downloaded ipfs_v0.4.7_linux-amd64.tar.gz
Installed go-ipfs v0.4.7 linux-amd64 to /home/zcy/ipfs-performance-profiling/node_modules/go-ipfs-dep/go-ipfs/
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 22 packages from 23 contributors in 145.954s

@Stebalien
Copy link
Member

Note, you can also use:

$ export GO_IPFS_DIST_URL="https://hardbin.com/ipns/dist.ipfs.io/"
$ npm install

Which is (mostly) equivalent to:

$ GO_IPFS_DIST_URL=https://hardbin.com/ipns/dist.ipfs.io npm install

@zcyzhu
Copy link
Author

zcyzhu commented Jan 17, 2019

@Stebalien ,yes,thank you

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

3 participants