Wrong stack trace with webpack
See original GitHub issueI’m getting this:
TypeError: Cannot read property 'length' of undefined
at t.handler (/var/task/webpack:/src/main.ts:16:38)
at invoke (/var/runtime/node_modules/awslambda/index.js:285:5)
at InvokeManager.start (/var/runtime/node_modules/awslambda/index.js:151:9)
I think the webpack:
part should not be there.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Webpack + Babel Wrong Line Numbers in Stack Trace
I'm building an application with Webpack and Babel. When the application runs into an error, it correctly lists the line number for the ......
Read more >Webpack from Nothing - Stack Traces and Line Numbers that ...
Re-run Webpack and open up dev/index.html , then open the JavaScript console, and then click the “Preview” button: Image of a useless stack...
Read more >Stack-traces showing source at line number where error ...
I'm using Webpack with Sentry and Serverless (AWS Lambda). Error stack-traces are showing up as source but the line numbers are from where ......
Read more >How to apply source maps to error stack traces when using ...
Here's an example of an exception stack trace in the APM app when using minified code. As you can see, it's not very...
Read more >DevTools Console stack trace does not take into account ...
I looked at your example and debugged it and it seems that Angular wraps thrown Error in try/catch block (see callWithDebugContext) when the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://webpack.js.org/configuration/output/#outputdevtoolmodulefilenametemplate
here is the solution
If your webpack build environment is the same as your Node.js running environment (usually at development time), you can provide
[absolute-resource-path]
with thedevtoolModuleFilenameTemplate
option.If it is different (using CI/CD), it is better to use relative paths. (ex:
../[resource-path]
)And I decided to use Sentry’s Release feature. (upload webpack bundle and sourcemap file in Sentry in release time (in the CircleCI), Sentry merge them and show proper stack trace)
https://docs.sentry.io/workflow/releases