Microscope 安装缺少cosmConfig-4.0.0.tgz 压缩包

francis@ubuntu:~/Downloads/microscope$ yarn install
yarn install v1.9.4
warning You are using Node “4.2.6” which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: “^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0”
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages…
[2/4] Fetching packages…
error An unexpected error occurred: “https://registry.npmjs.org/cosmConfig/-/cosmConfig-4.0.0.tgz: Request failed “404 Not Found””.
info If you think this is a bug, please open a bug report with the information provided in “/home/francis/Downloads/microscope/yarn-error.log”.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

无法下载cosmConfig-4.0.0.tgz,请问是什么问题

@francislee 请删除 yarn.lock 再尝试安装一次

另外我注意到您使用的是 [email protected], 版本也太老了, 现在的长期稳定版本是 8.11

最后, 我们月底会发布新版本, 届时会有编译后的 Microscope, 可以直接使用

我已经成功安装了区块链浏览器,请问 我该如何配置使用它?

@pengxinjian
如果你已经通过执行 yarn run build:prod 获得了 dist 目录, 那么双击 dist/index.html 就可以本地打开浏览器了, 如果你要在服务器上部署浏览器, 我们有一个简单流程

答:

  1. 安装 nginx
  2. 将microscope打包后 生成的 dist 文件移动到 /var/www 目录下并重命名为 microscope
  3. 配置 nginx
    1. /etc/nginx/sites-enabled/ 目录下新建 microscope.conf 文件

server {
listen 8080;
server_name localhost;
root /var/www/microscope/;
index index.html;
}

  1. 在终端中执行重启 nginx 的指令, 然后就可以在 ip:8080 访问页面了

nginx -s reload

@pengxinjian
如果你问的是 build 之前的配置文件 .env, 可以直接复用这个

PUBLIC=https://cdn.cryptape.com
CHAIN_SERVERS=https://microscope.cryptape.com:8888
APP_NAME=Microscope
LNGS=zh,en

如果我想监听我搭建的私链,是不是在网页的侧面板设置ip地址和端口就行了

请问需要监听自己搭建的cita,需要改哪些参数呢?

在侧面板中设置 ip 和端口就就可以了, 注意 http 和 https 的区别, 如果要将私链地址设置为浏览器的默认地址, 则修改 .env 中的 CHAIN_SERVERS, 当然, 如果只是自己用用, 就不用这么麻烦了

如果只是自己用用, .env 中的参数改为上面我贴的, 其中第二行 CHAIN_SERVERS 改为自己的链的地址, 或者cita 在本机运行的话输入 localhost:1337

第二种懒人包方法, 就用我贴的配置, 打开浏览器后在侧边弹窗里输入链的地址, 如果侧边栏没有自动弹出, 点击顶部’ test-chain’ 可以弹出

第三种超级懒人包方法, 直接用我们提供的在线版本http://microscope.cryptape.com/#/, 在侧边栏输入链的地址

1 Like


非常感谢你的帮助,还有一个问题想请问一下
我在Ubuntu 18.04 上安装Microscope,运行 yarn start 后出现以上错误,请问如何解决?谢谢

@pengxinjian 这是 microscope 中 develop 分支的代码吧

这几行错误是提醒数据类型不正确, 原因是配对的 sdk 没有正式升级发布

然后呢, 这几个错误只会影响开发时的代码提示, 不影响 microscope 使用

最后, 我刚刚更新了一下 microscope 的 develop 分支, 不嫌麻烦的话请 git pull 一下, 烦恼扫光光

谢谢,我已经换了release分支了,问题解决!
但是,我在设置浏览器监控cita私链的时候,一直在报Network Error
后来,我输入url 127.0.0.1:1337 能够出现test-chain 的信息,但刷新浏览器后在re-birth 就出现了以下错误:
2018-09-13 08:39:53 -0700: HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format, parsing fails.>

请问是什么问题呢?

还有会报Cache Server Not Available 的问题,是什么原因呢?re-birth已经运行了

Invalid HTTP format 这个错误需要你贴一下完整的日志

Cache Server Not Available 可能是上面的问题引起的, 因为 ReBirth 没有返回内容, 所有 Microscope 认为没有连上 ReBirth