npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bnb-error-parser

v0.0.1-alpha.5

Published

线上异常错误处理

Readme

线上异常处理

分析处理线上收集的异常日志

安装

npm install bnb-error-parser

usage

准备工作

使用bnb-error-parser之前需要做一些准备工作:

1. 安装ykit-config-uglify

ykit-config-uglify是ykit的插件,修改了ykit默认的压缩方法,生成压缩文件的source map。

    npm install --save-dev ykit-config-uglify

2. 修改项目根目录下的ykit文件

增加ykit-config-uglify插件

module.exports = {
    //...其他配置项
    plugins: [
        'uglify',
         'yo'
    ],
}

注意先引入uglify插件

3. 升级yki版本

升级ykit到0.8.10版本,和部署环境的ykit版本保持一致

全局安装运行

bnb-error-parser parse example_error_log.txt

项目本地安装运行

1. 在package.json的scripts字段加入新的命令

    {
        scripts: {
            "script_name": "bnb-error-parser parse example_error_log.txt"
        }
    }

2. 命令行执行

npm run script_name

查看结果

执行命令后会自动在项目根目录下输出'error_log_output.txt'文件。文件中显示异常对应的dev文件夹下的代码位置。

异常日志说明

日志信息用“####”分隔,含有错误信息和用户信息。