Closed baktun14 closed 7 years ago
If you load the stackdriver-errors.js
file, this one assumes that the stacktrace-js
module has been loaded.
I never tested this module with webpack. Feel free to add more install details to the README and send fixes.
I never worked with the gulp workflow so I don't really how to get this working properly :(
Does importing the stacktrace-js
module solve the issue?
I haven't tried sorry.. I didn't know stackdriver had it's own api so I'll just write a few lines to report the errors. Thanks anyways!
As you want. But technically, those few lines will be https://github.com/GoogleCloudPlatform/stackdriver-errors-js/blob/master/stackdriver-errors.js
@steren How this stacktrace-js should be imported?
require('stacktrace-js')
const { StackdriverErrorReporter } = require('stackdriver-errors-js')
window.addEventListener('DOMContentLoaded', function () {
window.errorHandler = new StackdriverErrorReporter();
window..errorHandler.start({
})
})
gives an error:
When you do require('stacktrace-js')
, does it exposes a global StackTrace
object?
This is what is expected by stackdriver-errors.js
I tried to quickly connect and test and got this error. I'm using webpack/react and used it like this.
I suppose you could include StackTrace as a dependency.