bitovi / velocirender

Accelerated server-side rendering.
https://bitovi.github.io/velocirender/
MIT License
128 stars 5 forks source link

ReferenceError: MutationObserver is not defined #53

Closed joshgillies closed 5 years ago

joshgillies commented 5 years ago

As our SPA includes the NewRelic SPA snippet the following error is produced when running velocirender:

ReferenceError: MutationObserver is not defined
    at Object.__nr_require.10 (evalmachine.<anonymous>:3:7350)
    at r (evalmachine.<anonymous>:3:117)
    at evalmachine.<anonymous>:3:168
    at Object.__nr_require.4 (evalmachine.<anonymous>:3:2179)
    at r (evalmachine.<anonymous>:3:117)
    at __nr_require.1 (evalmachine.<anonymous>:3:292)
    at evalmachine.<anonymous>:3:309
    at evalmachine.<anonymous>:6:6
    at Script.runInContext (vm.js:102:20)
    at Object.runInContext (vm.js:280:6)

At this stage it looks like jsdom has finally implemented MutationObserver we should be able to update to the latest version to suppress this error.

matthewp commented 5 years ago

Hey @joshgillies thanks for this report! Velocirender actually includes its own MutationObserver shim, I'm surprised that you're getting this error. Is this coming from a publicly accessible URL by any chance? If so I could check it out and see what is going on.

matthewp commented 5 years ago

Actually I was able to recreate that myself so no worries on getting me your URL. I'll figure it out, hopefully soon.

matthewp commented 5 years ago

Hey @joshgillies, this is fixed in 1.3.6, thanks for reporting!