source-map-cli

raw JSON →
1.0.1 verified Sat Apr 25 auth: no javascript

Command-line interface for the Mozilla source-map library, enabling developers to resolve original source locations from minified or bundled JavaScript files. Current stable version is 1.0.1 (released March 2023) with irregular release cadence. Designed for debugging error stack traces in production, it supports resolving line/column mappings from source maps, showing context, and works with local files or URLs. Differentiator: provides an interactive CLI with visual context markers, unlike programmatic source-map libraries.

error source-map: not found
cause The package 'source-map' is a peer dependency and must be installed globally or in the same context.
fix
npm install -g source-map-cli source-map
error Error: Cannot find module 'source-map'
cause The source-map module is missing from the Node.js module path.
fix
Ensure source-map is installed: npm install -g source-map
gotcha The tool requires Node.js >=8.
fix Update Node.js to v8 or higher.
gotcha Source map file path or URL must be accessible; relative paths are resolved from the current working directory.
fix Use absolute paths or ensure the file is in the current directory.
gotcha Column marker may not appear correctly in some terminals.
fix Use --no-marker option to suppress marker.
npm install source-map-cli
yarn add source-map-cli
pnpm add source-map-cli

Installs the CLI globally and resolves a source map location from line 1, column 28.

npm install --global source-map-cli
source-map resolve bundle.js.map 1 28