nodejs, v4.x/v6.x transition

76 views
Skip to first unread message

Robert Nelson

unread,
Nov 15, 2016, 10:17:30 PM11/15/16
to Beagle Board
Hey Everyone,

Over the weekend, there was a few requests to bump our version of nodejs.

So everyone knows, the v0.12.x is going eol shortly:

https://github.com/nodejs/LTS/blob/master/README.md

So i started looking at all our default nodejs packages and started
patching them to support 3 versions of nodejs (v0.12.x/v4.x/v6.x).
For those that don't know, we do a pre-build on all npm packages, so
the end user doesn't see the build delay caused by "npm install
xyz"...

Originally i thought v0.12.x -> v4.x was going to be a little painful,
but that turned out pretty easy, and v6.x is coming along pretty
good.. So here is my current rebuild status of our nodejs packages:

cloud9 (1 massive package) (100%)
bonescript (1 npm package) (100%)
bone101 (2 npm package) (100%)
node-red (4 npm package) (90%-went home knowing what i need to finish this)
google-iot (1 npm package) (not started)
wificonfig (1 npm package) (not started)

I'm thinking now to just drop v4.x, i just did that as i'm a little
conservative, and therefor switching next sunday's image to v6.x
nodejs by default (20161120)..

For those that are still using v0.12.x, i'm not going to drop you..
You can see how the deb package works here:

https://github.com/rcn-ee/repos/blob/master/bb-bone101/suite/jessie/debian/postinst#L19-L52

(i'll probably drop the v4.x)

So "as-long" as the package still builds, we'll push updates.

Thoughts?

Regards,

--
Robert Nelson
https://rcn-ee.com/

William Hermans

unread,
Nov 16, 2016, 12:15:15 AM11/16/16
to beagl...@googlegroups.com
4.6.2 is easy to build from source Robert. It just takes a little bit of time to compile directly on a beaglebone is all. 2-3 hours, is all.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYjTx%2BkaCjkA5UxfFE%2BO%3DCJE6FS5JjqokMSSuEkuGiBxrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Kridner, Jason

unread,
Nov 16, 2016, 6:40:16 AM11/16/16
to Robert Nelson, Beagle Board
Big question for me is testing. How can we get it out to users for feedback before making it the default?

I prefer my package.json to specify specific versions of software tested to be known good. Do you know if some of these have backwards compatibility issues that prevent the packages from running with old versions?


>
> Regards,
>
> --
> Robert Nelson
> https://rcn-ee.com/
>
> --
> You received this message because you are subscribed to the Google Groups "Beagle Alpha" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagle-alpha...@googlegroups.com.

William Hermans

unread,
Nov 16, 2016, 7:01:01 AM11/16/16
to beagl...@googlegroups.com
I think it may be wise to at least provide build instructions for 4.x. In case something someone needs in addition to the packages you provide
 are reasonably guaranteed to be usable. If not by one version but by another.

Anyway I can provide build instructions for 4.2.6( from source ). It's actually very easy. But as for NodeRED, and the rest . . . I have no hands on. I do actually prefer using NPM to install the few packages I use. Despite disliking NPM with a passion. I try to limit my NPM package installs to Path, socket.io, and Express when at all possible.

> To unsubscribe from this group and stop receiving emails from it, send an email to beagle-alpha+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.

Robert Nelson

unread,
Nov 16, 2016, 10:29:57 AM11/16/16
to Beagle Board
On Wed, Nov 16, 2016 at 6:00 AM, William Hermans <yyr...@gmail.com> wrote:
> I think it may be wise to at least provide build instructions for 4.x. In
> case something someone needs in addition to the packages you provide
> are reasonably guaranteed to be usable. If not by one version but by
> another.

We stopped building nodejs, we use the repo provided by nodesource:

https://github.com/nodesource/distributions

Our jessie images have had this enabled for most of the last year:

deb https://deb.nodesource.com/node_0.12 jessie main
#deb-src https://deb.nodesource.com/node_0.12 jessie main

and upgrade to v6.x is just to change that too:

deb https://deb.nodesource.com/node_6.x jessie main
#deb-src https://deb.nodesource.com/node_6.x jessie main

> Anyway I can provide build instructions for 4.2.6( from source ). It's
> actually very easy. But as for NodeRED, and the rest . . . I have no hands
> on. I do actually prefer using NPM to install the few packages I use.
> Despite disliking NPM with a passion. I try to limit my NPM package installs
> to Path, socket.io, and Express when at all possible.

node-red takes about an hour on the bbb, it also needs 512MB of swap
enabled, you can take a look at my script i use to pre-build the
project into our deb package:

https://github.com/rcn-ee/npm-package-node-red

mtn_beagle

unread,
Nov 16, 2016, 12:18:12 PM11/16/16
to BeagleBoard


Just to note what is on the Nodered.org site: 

Note: Node.js 7.x is under active development and is not recommended for a stable base. Many 3rd party node packages may not yet fully support Node 6.x and later, especially if they contain a binary component. Check with the author of the package if you are not sure.

I have used a couple of packages recently that only accepted 4.x as the latest supported version. Unfortunately, away from office to dig out notes.
I would prefer to have 4.x as the default for now until 6.x has more use in the wild. 

Best,
David Richards

William Hermans

unread,
Nov 16, 2016, 2:57:06 PM11/16/16
to beagl...@googlegroups.com
On Wed, Nov 16, 2016 at 8:28 AM, Robert Nelson <robert...@gmail.com> wrote:
On Wed, Nov 16, 2016 at 6:00 AM, William Hermans <yyr...@gmail.com> wrote:
> I think it may be wise to at least provide build instructions for 4.x. In
> case something someone needs in addition to the packages you provide
>  are reasonably guaranteed to be usable. If not by one version but by
> another.

We stopped building nodejs, we use the repo provided by nodesource:

https://github.com/nodesource/distributions

And this is why I refuse to use the version of Nodejs, or whatever it is that's provided by your APT repo. 


Our jessie images have had this enabled for most of the last year:

deb https://deb.nodesource.com/node_0.12 jessie main
#deb-src https://deb.nodesource.com/node_0.12 jessie main

and upgrade to v6.x is just to change that too:

deb https://deb.nodesource.com/node_6.x jessie main
#deb-src https://deb.nodesource.com/node_6.x jessie main

> Anyway I can provide build instructions for 4.2.6( from source ). It's
> actually very easy. But as for NodeRED, and the rest . . . I have no hands
> on. I do actually prefer using NPM to install the few packages I use.
> Despite disliking NPM with a passion. I try to limit my NPM package installs
> to Path, socket.io, and Express when at all possible.

node-red takes about an hour on the bbb, it also needs 512MB of swap
enabled, you can take a look at my script i use to pre-build the
project into our deb package:

https://github.com/rcn-ee/npm-package-node-red

You misunderstand me. I have absolutely no interest in NodeRED, or any of that other "hooey". But I figured that support for your other Node packages might be important to you.

When it comes to Node, or honestly most anything, I'm a purist. I like to keep things a stock as possible. This way, there are very few surprises, and if there are. Well then all I have to do is read the official documentation. So when I hear that you're "not using Nodejs any more, but using nodesource. .." I tend to view that as polluting the Linux image we're using. Because quite honestly I have no idea wtf this source really *is*

It's kind of like your boot script. It's really good to have when you need it. BUt if you need to remove any part of it . . . well, whats even there, and then once we know whats there, how do we remove it if we have to ?

Robert Nelson

unread,
Nov 16, 2016, 3:15:21 PM11/16/16
to Beagle Board
Sorry, you must have miss-understood my message..

We stopped building/packaging nodejs on "my" own, instead we use the
version of nodejs from the nodesource repo.. They build it directly
from nodejs proper..

As they provide, repos for these versions

v0.12.x
v4.x
v6.x

Including the odd ducks:

v0.10.x
iojs_1.x
iojs_2.x
iojs_3.x
v5.x
v7.x

Robert Nelson

unread,
Nov 16, 2016, 3:22:05 PM11/16/16
to Beagle Board
With a few patches to one of node-red's dependicies, nodejs v6.x works
good on that.. ;)

But, yeah, we'll just bump to v4.x, give it a few more months till v6..

Right now i just fired up a full image re-build, so v4.x users will
have something out of the box to use..

William Hermans

unread,
Nov 16, 2016, 3:40:27 PM11/16/16
to beagl...@googlegroups.com
I'd say, if it works well with NodeRED, I'd say go for v6 . . . except someone is bound to run into a similar wall that I ran into with Phantomjs a few months ago. Maybe not Phantomjs specifically, but something will brake most likely.

The basics that I use, Express, Path, and socket.io + avoid anything else like the plague. Would probably work fine. Not sure why I'm hesitant to move to v6.x personally . . . but I figure it's a safe bet to "hold still" for a while longer. Plus 4.x has support for what ? Another couple years at least right ?

Jason Kridner

unread,
Nov 16, 2016, 3:46:00 PM11/16/16
to beagl...@googlegroups.com
I'm assuming that is with a broken BoneScript until updated?

>
> Regards,
>
> --
> Robert Nelson
> https://rcn-ee.com/
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYjuwQup4jE%3DBRhNt_S98Q%3D-rZjOGu%2BHyv-RofPJ_VmZVw%40mail.gmail.com.

Robert Nelson

unread,
Nov 16, 2016, 3:49:39 PM11/16/16
to Beagle Board
On Wed, Nov 16, 2016 at 2:45 PM, Jason Kridner <jkri...@gmail.com> wrote:
>
>
>> On Nov 16, 2016, at 3:21 PM, Robert Nelson <robert...@gmail.com> wrote:
>>
>> On Wed, Nov 16, 2016 at 11:18 AM, mtn_beagle
>> <djric...@axeoninvestments.com> wrote:
>>>
>>>
>>>> Just to note what is on the Nodered.org site:
>>>
>>>
>>> Note: Node.js 7.x is under active development and is not recommended for a
>>> stable base. Many 3rd party node packages may not yet fully support Node 6.x
>>> and later, especially if they contain a binary component. Check with the
>>> author of the package if you are not sure.
>>>
>>> I have used a couple of packages recently that only accepted 4.x as the
>>> latest supported version. Unfortunately, away from office to dig out notes.
>>> I would prefer to have 4.x as the default for now until 6.x has more use in
>>> the wild.
>>
>> With a few patches to one of node-red's dependicies, nodejs v6.x works
>> good on that.. ;)
>>
>> But, yeah, we'll just bump to v4.x, give it a few more months till v6..
>>
>> Right now i just fired up a full image re-build, so v4.x users will
>> have something out of the box to use..
>
> I'm assuming that is with a broken BoneScript until updated?

Here's the patches for bonescript:

https://github.com/rcn-ee/npm-package-bonescript

v4:

https://github.com/rcn-ee/npm-package-bonescript/blob/master/node-i2c-v4-plus.diff

v6:
https://github.com/rcn-ee/npm-package-bonescript/blob/master/node-i2c-v4-plus.diff
https://github.com/rcn-ee/npm-package-bonescript/blob/master/node-serialport-v6.diff
https://github.com/rcn-ee/npm-package-bonescript/blob/master/node-epoll-v6.diff

Only lightly tested..
Reply all
Reply to author
Forward
0 new messages