pyatyispyatil / flame-chart-js

Extensible component for incredibly fast viewing of flame charts
https://pyatyispyatil.github.io/flame-chart-js/
MIT License
100 stars 23 forks source link

README.md example fails #43

Closed abitrolly closed 1 year ago

abitrolly commented 1 year ago

I am trying to run the code from the readme at https://playcode.io/

First problem is that the playground is unable to find the latest version of the library.

image

And then the example fails with this error.

TypeError: data is undefined
setData@https://preview-new.playcode.io/ line 18 > injectedScript:1960:7
WaterfallPlugin@https://preview-new.playcode.io/ line 18 > injectedScript:1907:12
FlameChart@https://preview-new.playcode.io/ line 18 > injectedScript:2240:27
@https://preview-new.playcode.io/ line 18 > injectedScript:85:18
dn@https://preview-new.playcode.io/ line 6 > injectedScript:18:5449
abitrolly commented 1 year ago

I had to remove a couple if lines to make it work. The last one was this.

    waterfall: { /* ... */ },
pyatyispyatil commented 1 year ago

The readme contains only an exemplary usage code with comments that allows you to understand how to use the library. For a fully working version, you should look into the example folder.)

abitrolly commented 1 year ago

@pyatyispyatil any ideas why latest version is not importable by JS playgrounds?

pyatyispyatil commented 1 year ago

Most likely something is wrong with the playground, since all versions are available in npm.(

abitrolly commented 1 year ago

It is not the only one. Perhaps something had changed about packaging format, but I am not sure how to check if module discovery with NPM works correctly.