sentry-cli 上传 sourcemap

张映 发表于 2018-09-20

分类目录: 服务器相关

标签:, ,

Source map就是一个信息文件,里面储存着位置信息。也就是说,转换后的代码的每一个位置,所对应的转换前的位置。

有了它,出错的时候,除错工具将直接显示原始代码,而不是转换后的代码。这无疑给开发者带来了很大方便。

1,安装sentry-cli

# npm install -g sentry-cli

2,sentry服务端找到token

直接方式,http://sentry.xxxx.com/api/,下面有token

也可以在主页面的下方去找,不是在左下导行,就在右下。

3,sentry-cli登录

# sentry-cli --url http://sentry.xxxxx.com/ login
This helps you signing in your sentry-cli with an authentication token.
If you do not yet have a token ready we can bring up a browser for you
to create a token now.

Sentry server: sentry.xxxxx.com
Open browser now? [y/n] n
Enter your token:
Enter your token: f6*************************b1
Valid token for user Tank.zhangying@xxxxx.com

Stored token in /root/.sentryclirc

4,上传sourcemap

# sentry-cli releases -o myterm -p electron files staging@1.0.0 upload-sourcemaps /home/test/map
> Analyzing 10 sources
> Adding source map references
> Uploading source maps for release staging@1.0.0

Source Map Upload Report
 Minified Scripts
 ~/index.js (sourcemap at index.js.map)
 ~/playback.js (sourcemap at playback.js.map)
 ~/ppt.js (sourcemap at ppt.js.map)
 ~/tindex.js (sourcemap at tindex.js.map)
 ~/tindexv5.js (sourcemap at tindexv5.js.map)
 Source Maps
 ~/index.js.map
 ~/playback.js.map
 ~/ppt.js.map
 ~/tindex.js.map
 ~/tindexv5.js.map

如果报413错误,配置nginx.conf在http中加上
client_max_body_size 50m;



转载请注明
作者:海底苍鹰
地址:http://blog.51yip.com/server/1976.html

1 条评论

  1. Michael翔 留言

    博主,你的博客内容挺丰富的,而且文章也易懂,请问RSS地址是多少呢?

留下评论

留下评论
  • (必需)
  • (必需) (will not be published)
  • (必需)   3X3=?