执行npm install go-ipfs时出现错误

时间:2019-01-13 13:41:11

标签: npm-install ipfs

我正在运行npm install go-ipfs错误,

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

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-13T13_37_11_707Z-debug.log

为什么会出现此问题,我似乎无法连接到网络,该怎么办?

3 个答案:

答案 0 :(得分:0)

我只是亲自尝试并正常工作:

```
» npm i go-ipfs-dep

> go-ipfs-dep@0.4.18 install /Users/imp/code/sandbox/node_modules/go-ipfs-dep
> node src/bin.js

Downloading https://dist.ipfs.io/go-ipfs/v0.4.18/go-ipfs_v0.4.18_darwin-amd64.tar.gz
Downloaded ipfs_v0.4.18_darwin-amd64.tar.gz
Installed go-ipfs v0.4.18 darwin-amd64 to /Users/imp/code/sandbox/node_modules/go-ipfs-dep/go-ipfs/
npm WARN saveError ENOENT: no such file or directory, open '/Users/imp/code/sandbox/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/imp/code/sandbox/package.json'
npm WARN sandbox No description
npm WARN sandbox No repository field.
npm WARN sandbox No README data
npm WARN sandbox No license field.

+ go-ipfs-dep@0.4.18
updated 1 package and audited 1208 packages in 14.167s
found 0 vulnerabilities
```

您可以在浏览器中打开https://dist.ipfs.io/吗?从那里下载有效吗?

这可能是服务故障,但也可能是网络上的问题。让我知道您是否再试一次仍然发现问题。

答案 1 :(得分:0)

您的DNS似乎将dist.ipfs.io解析为31.13.80.1,这是由Facebook(https://bgp.he.net/net/31.13.80.0/24)控制的IP地址,而不是IPFS项目。那不是一个可以解析的IP地址,因此我将与您的DNS解析器或/ etc / hosts进行核对,看看是否有奇怪的事情发生。

也许尝试切换到其他DNS解析器,看看它是否可以解决:https://1.1.1.1/

答案 2 :(得分:0)

是的,有问题,我使用网关下载IPFS,但是

zcy@ubuntu:~$ npm install go-ipfs
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN checkPermissions Missing write access to /home/zcy/node_modules/go-ipfs/node_modules/go-platform
npm WARN checkPermissions Missing write access to /home/zcy/node_modules/go-ipfs/node_modules/tar-fs/node_modules/pump
npm WARN checkPermissions Missing write access to /home/zcy/node_modules/go-ipfs/node_modules/tar-fs
npm WARN checkPermissions Missing write access to /home/zcy/node_modules/go-ipfs
npm WARN checkPermissions Missing write access to /home/zcy/node_modules/go-ipfs/node_modules
npm WARN checkPermissions Missing write access to /home/zcy/node_modules/go-ipfs/node_modules/tar-fs/node_modules
npm WARN enoent ENOENT: no such file or directory, open '/home/zcy/package.json'
npm WARN prop-types-extra@1.1.0 requires a peer of react@>=0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-bootstrap@0.32.4 requires a peer of react@^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-bootstrap@0.32.4 requires a peer of react-dom@^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-overlays@0.8.3 requires a peer of react@^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-overlays@0.8.3 requires a peer of react-dom@^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-prop-types@0.4.0 requires a peer of react@>=0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group@2.5.2 requires a peer of react@>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group@2.5.2 requires a peer of react-dom@>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN uncontrollable@5.1.0 requires a peer of react@>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@1.12.2 requires a peer of webpack@^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@2.9.1 requires a peer of webpack@^2.2.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN zcy No description
npm WARN zcy No repository field.
npm WARN zcy No README data
npm WARN zcy No license field.

npm ERR! path /home/zcy/node_modules/go-ipfs/node_modules/go-platform
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/home/zcy/node_modules/go-ipfs/node_modules/go-platform'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

enter image description here

enter image description here

但是我有一个平台文件