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

Fails to correctly parse a stack trace for a file that has spaces in the name. #46

Closed ashleydavis closed 4 years ago

ashleydavis commented 5 years ago

Hi thanks for this library. It looks great all though I've had some problems getting off the starting block with it.

I've prepared an example project which shows that this library fails to parse a stack trace that has spaces in its name.

I've prepared a test project to show the problem: https://github.com/ashleydavis/stack-trace-example

Expected Behavior

Should be able to parse a stack trace for a file with spaces in it's name.

Current Behavior

The name of the file that throws the error is "my test script.js".

As you can see by the following screenshot the initial components of the file name (before the space) are stripped out:

stack trace issue

Steps to Reproduce (for bugs)

I've prepared an example repository: https://github.com/ashleydavis/stack-trace-example

Clone the repo. Or download and unpack the repo. Use npm install to install dependencies. Use npm start to run the example project.

You will see the problem in the parsed stack trace that is printed to the console.

Context

I was hoping to use your stack trace parser in my project, but I've been blocked from using it by this problem.

Your Environment

Possible Solution

Sorry, no idea.

niftylettuce commented 5 years ago

You can close this, latest NPM release has this fixed.

eriwen commented 4 years ago

Thanks both. Closing.