LDflex / Query-Solid

Simple access to data in Solid pods through LDflex expressions
https://solid.github.io/query-ldflex/
MIT License
66 stars 15 forks source link

e.on is not a function error in latest version #50

Closed james-martin-jd closed 4 years ago

james-martin-jd commented 4 years ago

After upgrading to 2.8.0 (and ensuring I was on node v12) I started noticing an error in the console, seemingly one message per ldflex query. The error is:

Uncaught (in promise) TypeError: e.on is not a function
10LinkedRdfSourcesAsyncRdfIterator.js:91 Uncaught (in promise) TypeError: e.on is not a function

This was observed on multiple developer machines, and at least one server deployment. After rolling back to 2.6.0 the error went away. It did not appear to impede the actual queries from executing, but we rolled back anyway to prevent console errors.

RubenVerborgh commented 4 years ago

Mmm… if anyone has a reproducible example, that would be helpful. Will try to find one.

DoctorBud commented 4 years ago

Attached are ldflexbug.html and ldflexbug_popup.html, which are sufficient to demonstrate the bug in 2.8.0 (login is required, so you'll need to serve up both files via an HTTP server). I have the example currently configured to use 2.7.0 and it works fine. Editing the <script> tag to use 2.8.0 will result in the error being reported in console. Note that data is still being returned successfully despite the error message.

I needed to use a .txt file extension to attach these files to the GitHub issue

RubenVerborgh commented 4 years ago

Thanks @DoctorBud, I appreciate it!

RubenVerborgh commented 4 years ago

This was not a bug in LDflex, but rather the result of me building and publishing the npm package while my local dependencies were modified. b7054b1b3a99f3229a5e5d6283795bebd545fc41 will prevent this from happening again.