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

Supported Node Version #9

Open
thigg opened this issue May 31, 2017 · 4 comments
Open

Supported Node Version #9

thigg opened this issue May 31, 2017 · 4 comments
Assignees

Comments

@thigg
Copy link

thigg commented May 31, 2017

Hi,

according to your docs. Node 4.x.x is supported. But the following happens for me:

$ nodejs --version
v4.2.6
$ nodejs examples/set_led.js
examples/set_led.js:1
(function (exports, require, module, __filename, __dirname) { let lightblue = require('../src/lightblue')
                                                              ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

which looks like nodejs4 is not supported. At least for that example.

@gsundin
Copy link
Contributor

gsundin commented May 31, 2017

Hello @thigg!

I don't believe the Bean Node SDK has ever supported 4.x.x (always 6.0.0+), so that must be a typo. Could you point me to where it says 4.x.x is supported?

@gsundin gsundin self-assigned this May 31, 2017
@thigg
Copy link
Author

thigg commented May 31, 2017

@gsundin
Copy link
Contributor

gsundin commented May 31, 2017

@thigg nice catch! The typo has been corrected and will be updated soon.

@swstack
Copy link
Contributor

swstack commented Jun 5, 2017

The sdk/cli itself will run in older versions of node once it's transpiled using Babel.js, which occurs when you run npm run build. However, the examples themselves are not part of that transpile process ... you could easily do it yourself but there is no reason not to just run the Node LTS version (unless on RPi where you may be more limited).

@gsundin I would remove the mention of specific version numbers and just say the LTS and Current version are supported, which are always a moving target. When this project was developed the LTS was 4.x.x.

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