kiln / flourish-sdk

The SDK for developing Flourish templates
Other
81 stars 16 forks source link

Remove "Unexpected JSON message" warnings from console #92

Closed aendra-rininsland closed 8 months ago

aendra-rininsland commented 9 months ago

While developing I endlessly get notices like this in my logs:

image

AFAICT it's because of the React Dev Tools heartbeat process, which causes Flourish SDK to print it in the console as a warning.

I could just disable the React Dev Tools extension but I use it while developing. I'd submit a PR to fix it here, but the file in question doesn't really seem to be part of the repo (I suspect it's copied from another Flourish repo into here).

One option would be to use the npm debug module in script.js so debug messages like that only appear if localStorage.debug = 'flourish:*' or some such.

markl-canva commented 8 months ago

Hi @aendra-rininsland - thanks for reporting this; it's been annoying for me too! We have a fix for this, and I expect that we will release a new version of this package with that fix on Friday.

markl-canva commented 8 months ago

Hi @aendra-rininsland - if you try updating the Flourish SDK to 4.2.0, hopefully this problem should be gone. If not, please let me know and we'll try to figure out why not!

aendra-rininsland commented 8 months ago

Oh amazing! Just updated and it seems resolved now! Thanks so much! 🙌