Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Characteristic cannot be invoked without 'new' #47

Open
edgexie opened this issue Sep 27, 2023 · 3 comments
Open

Characteristic cannot be invoked without 'new' #47

edgexie opened this issue Sep 27, 2023 · 3 comments

Comments

@edgexie
Copy link

edgexie commented Sep 27, 2023

when I run example pizza, I get the error:

image

@gasteropod
Copy link

I hit this issue, not in the examples, but in my own code after an upgrade.
I believe this is because version 0.6 bleno is basing on ES6 classes so older js code will not work.
It appears that the examples have not been updated to cater for this either.
Until code, e.g. my code and the examples are updated, they will not work with 0.6 and you'll need to use 0.5.1-4(https://www.npmjs.com/package/@abandonware/bleno/v/0.5.1-4) instead.

Hopefully @rzr can update the examples to work with ES6 classes since this is beyond me. I'm moving back to 0.5 until I can work out the changes needed.

@gasteropod
Copy link

In the root directory there are 3 test files which act as examples and have been updated to use ES6 classes. I was able to use those to understand enough to update my code to get it to work with 0.6, so I'm now on Debian bookworm with bleno 0.6.1 running my server. It would be good if the formal examples were updated too, but the test files sufficed for me.

Would be happy to updated the examples myself if rzr would be happy to accept these.

@ajtadeo
Copy link

ajtadeo commented Nov 30, 2023

i ran into this issue as well, it would be very helpful for people learning how to use this module if the examples compiled correctly and were updated to ES6 classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants