{"id":15603289,"url":"https://github.com/codemeasandwich/resolve-browser-trace","last_synced_at":"2026-07-11T00:32:14.783Z","repository":{"id":57354665,"uuid":"453372239","full_name":"codemeasandwich/resolve-browser-trace","owner":"codemeasandwich","description":"A Server/Node library to rebuild client side stacktraces into source files","archived":false,"fork":false,"pushed_at":"2023-01-16T12:18:58.000Z","size":275,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-29T19:48:54.716Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codemeasandwich.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-29T11:00:09.000Z","updated_at":"2023-09-27T09:07:07.000Z","dependencies_parsed_at":"2023-02-10T03:16:04.754Z","dependency_job_id":null,"html_url":"https://github.com/codemeasandwich/resolve-browser-trace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codemeasandwich/resolve-browser-trace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemeasandwich%2Fresolve-browser-trace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemeasandwich%2Fresolve-browser-trace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemeasandwich%2Fresolve-browser-trace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemeasandwich%2Fresolve-browser-trace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemeasandwich","download_url":"https://codeload.github.com/codemeasandwich/resolve-browser-trace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemeasandwich%2Fresolve-browser-trace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35347554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T03:02:29.135Z","updated_at":"2026-07-11T00:32:14.751Z","avatar_url":"https://github.com/codemeasandwich.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# resolve-browser-trace\n\n### When it comes to the stability of your web application, knowing when your **production users have a problem is critical**!\n\nWhen we develop locally. We can have the convenience of a readable stacktrace to let you know what has happened.\nHowever, with your live site, letting the whole world know how our source is constructed is not something we may want.\n\n### The Problem:\n**How can we get a useful stack trace from client-side errors without exposing the inner workings?**\n\n\n### The Solution:\n**Send the client Error \u0026 stack to the Server. Then get the server to clean up the stack-trace before it gets saved your logs for review.**\n\n## resolve-browser-trace is a NodeJs library to rebuild client side stacktraces into source pointers\n\n[![npm version](https://badge.fury.io/js/resolve-browser-trace.svg)](https://www.npmjs.com/package/resolve-browser-trace) [![License](http://img.shields.io/:license-apache_2-yellow.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\n\n### If this was helpful, [★ it on github](https://github.com/codemeasandwich/resolve-browser-trace)\n\n# Install\n\n`yarn add resolve-browser-trace`\n**or**\n`npm install --save resolve-browser-trace`\n\n### constructor / setup\n\n\nThe first step to import the lib\n``` js\nconst setupResolveTrace = require('resolve-browser-trace')\n```\n\nNext is to set the path to where you store your map files for your bundles\n``` js\nconst sourceDecoder = setupResolveTrace(__dirname+\"/src/ .map files are here\");\n```\n\nTo use just pass the stacktrace\n``` js\nsourceDecoder(stack) // returns Promise\n```\n\n# Example\n\n``` js\nconst sourceDecoder = require('resolve-browser-trace')(__dirname+\"/src/ .map files are here\")\n\nconst clientStacktrack = `@https://localhost/main-9adc196540168f060d54.min.js:1:3385\n@https://localhost/main-9adc196540168f060d54.min.js:1:96`;\n\nsourceDecoder(clientStacktrack).then(newStack =\u003e console.log(newStack))\n/* RESULT -\u003e [\n  {\n    \"source\": \"main.jsx\",\n    \"line\": 20,\n    \"column\": 21,\n    \"arguments\": [],\n    \"name\": appElem\n  },\n  {\n    \"source\": \"webpack/bootstrap 9adc196540168f060d54\",\n    \"line\": 19,\n    \"column\": 0,\n    \"arguments\": [],\n    \"name\": \"modules\",\n  }\n]*/\n```\n\n# setup your webpack\n\nwebpack.config.js\n```js\nmodule.exports = {\n  // ...\n  target:\"web\",\n  devtool: 'source-map',\n  output: {\n    path: path.resolve(__dirname, \"public\"),\n    filename: \"[name]-[hash].min.js\"\n  },\n  // ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemeasandwich%2Fresolve-browser-trace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemeasandwich%2Fresolve-browser-trace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemeasandwich%2Fresolve-browser-trace/lists"}