stacktracejs / error-stack-parser

Extract meaning from JS Errors
https://www.stacktracejs.com/#!/docs/error-stack-parser
MIT License
456 stars 52 forks source link

npm install error-stack-parser is actually installing version 3.0.0 when using npm mirror #89

Closed loynoir closed 1 year ago

loynoir commented 1 year ago

Expected Behavior

$ cat reproduce.mjs
// @ts-check
import ErrorStackParser from "error-stack-parser"
console.log(ErrorStackParser.parse(new Error()))
$ npm remove error-stack-parser
$ npm add error-stack-parser@2.1.4 && node reproduce.mjs
...
[
  {
    columnNumber:

Current Behavior

@titanism @eriwen

$ npm remove error-stack-parser
$ npm add error-stack-parser && node reproduce.mjs
...
console.log(ErrorStackParser.parse(new Error()))
                             ^

TypeError: ErrorStackParser.parse is not a function
    at file:///workspaces/repo/reproduce.mjs:3:30
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

Node.js v18.15.0
$ grep error-stack-parser package.json
    "error-stack-parser": "^3.0.0",

Steps to Reproduce (for bugs)

Context

Your Environment

Possible Solution

Related