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

Node Deprecation Warnings #29

Open
alexcastillo opened this issue Apr 11, 2017 · 8 comments
Open

Node Deprecation Warnings #29

alexcastillo opened this issue Apr 11, 2017 · 8 comments

Comments

@alexcastillo
Copy link

Currently getting the following deprecation warnings when I run the example:

const Ganglion = require('openbci-ganglion').Ganglion;
const ganglion = new Ganglion();
ganglion.once('ganglionFound', (peripheral) => {
  // Stop searching for BLE devices once a ganglion is found.
  ganglion.searchStop();
  ganglion.on('sample', (sample) => {
    /** Work with sample */
    console.log(sample.sampleNumber);
    for (let i = 0; i < ganglion.numberOfChannels(); i++) {
      console.log("Channel " + (i + 1) + ": " + sample.channelData[i].toFixed(8) + " Volts.");
    }
  });
  ganglion.once('ready', () => {
    ganglion.streamStart();
  });
  ganglion.connect(peripheral);
});
// Start scanning for BLE devices
ganglion.searchStart();
(node:96316) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Please turn blue tooth on.
(node:96316) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@andrewjaykeller
Copy link

Turn Bluetooth on?

@alexcastillo
Copy link
Author

Bluetooth is on. I'm running Node 7.8.
Could be that.

@andrewjaykeller
Copy link

oh i think you need to do <=6

@alexcastillo
Copy link
Author

It works though...
But why do I need Node 6?

@andrewjaykeller
Copy link

noble if i remember

@andrewjaykeller
Copy link

i tried to do the node engines in the package.json to prevent this, how can we fix this? should we leave this open? any ideas

@alexcastillo
Copy link
Author

I think we should leave open. This is just a warning, everything seems to be working.
We could look to see if in your code there is a promise without a .catch().

@andrewjaykeller
Copy link

ohhh yeah ok haha good

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

2 participants