Socket
Book a DemoInstallSign in
Socket

@fatso83/stacktrace-cli

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fatso83/stacktrace-cli

Show source-mapped line numbers

Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
2
-89.47%
Maintainers
1
Weekly downloads
 
Created
Source

stacktrace-cli

Retroactively show a source mapped location from a error message

Example:

You have such an error in your logs:

https://localhost:56962/app-bundle.js 129:600036 TypeError: Cannot read property 'map' of undefined

If you download then download app-bundle.js and app-bundle.js.map you can get the original source lines using this tool:

$ npx @fatso83/stacktrace-cli dist/app-bundle.js* 129:600036
{
    "columnNumber": 56,
    "lineNumber": 78,
    "fileName": "webpack:///src/store/entitys/entitys-reducer.js",
    "functionName": "getEntitysById"
}
{
    "columnNumber": 56,
    "lineNumber": 78,
    "fileName": "webpack:///src/store/entitys/entitys-reducer.js",
    "functionName": "map"
}

Install

You don't need to install it now that we have npx (see example), but you can install it globally if you want to:

npm install -g @fatso83/stacktrace-cli

You can then call it as stacktrace-cli wherever you are.

How?

  • Stacktrace.js
  • Node HTTP
  • Puppeteer

Stacktrace.js is wonderful. In theory. When trying to use it, the docs are missing all the bits on how to get this running. This is my attempt at solving an itch that needed scratching.

This was literally hacked together in 3 hours, so feel free to extract, refactor and package it up as the sweet little thing it could have been.

FAQs

Package last updated on 05 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts