LDflex/Query-Solid

e.on is not a function error in latest version

james-martin-jd opened this issue · 4 comments

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.

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

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

Thanks @DoctorBud, I appreciate it!

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. b7054b1 will prevent this from happening again.