Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not parse Node.js error.stack originating in webpack bundle #34

Open
gajus opened this issue Jan 11, 2017 · 1 comment
Open

Does not parse Node.js error.stack originating in webpack bundle #34

gajus opened this issue Jan 11, 2017 · 1 comment

Comments

@gajus
Copy link

gajus commented Jan 11, 2017

I am producing a webpack bundle and executing it using Node.js. There is an error originating in the bundle.

I have a source map. I want to parse the stack trace and apply the source map.

The following stack trace:

TypeError: __webpack_require__.i(...) is not a function
    at configureStore (isomorphic-webpack:1300:115)
    at Object../app/app.js (isomorphic-webpack:761:84)
    at __webpack_require__ (isomorphic-webpack:621:30)
    at fn (isomorphic-webpack:45:20)
    at resolveOverride (/Users/gajus/Documents/dev/gajus/react-boilerplate/node_modules/isomorphic-webpack/dist/factories/createIsomorphicWebpack.js:149:14)
    at Function._module2.default._load (/Users/gajus/Documents/dev/gajus/react-boilerplate/node_modules/isomorphic-webpack/node_modules/override-require/dist/overrideRequire.js:39:14)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at createCompilationPromise.then (/Users/gajus/Documents/dev/gajus/react-boilerplate/server/middlewares/frontendMiddleware.js:68:104)

Produces the following error:

/Users/gajus/Documents/dev/gajus/react-boilerplate/node_modules/isomorphic-webpack/node_modules/error-stack-parser/error-stack-parser.js:35
                throw new Error('Cannot parse given Error object');
                ^

Error: Cannot parse given Error object
    at ErrorStackParser$$parse (/Users/gajus/Documents/dev/gajus/react-boilerplate/node_modules/isomorphic-webpack/node_modules/error-stack-parser/error-stack-parser.js:35:23)
    at formatErrorStack (/Users/gajus/Documents/dev/gajus/react-boilerplate/node_modules/isomorphic-webpack/dist/factories/createIsomorphicWebpack.js:200:22)
    at process.on (/Users/gajus/Documents/dev/gajus/react-boilerplate/server/middlewares/frontendMiddleware.js:42:59)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)
    at processEmit [as emit] (/Users/gajus/Documents/dev/gajus/react-boilerplate/node_modules/fsevents/node_modules/signal-exit/index.js:155:32)
    at emitPendingUnhandledRejections (internal/process/promises.js:85:22)
    at runMicrotasksCallback (internal/process/next_tick.js:61:9)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Your Environment

  • Node v7.4.0
  • macOS 10.12
@adventurist
Copy link

Interesting! Any recent development on this? I haven't had any issues using error-stack-parser inside of a webpack bundle, but I have been trying to parse objects inheriting from Error, and that results in the same error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants