Page MenuHomeFreeBSD

www/npm: Add option to build with www/node6
AbandonedPublic

Authored by jrm on Aug 3 2017, 4:28 AM.

Details

Reviewers
sunpoet
Summary

Mastodon developers instruct users to use node6. Until recently though, net-im/mastodon worked fine with www/node, but there is a FreeBSD-specific bug with node8 now preventing users from getting the latest net-im/mastodon up and running [1].

https://github.com/nodejs/node/issues/14076

Hopefully a new node8 release will come soon, but in the meantime, could we add options to www/npm to allow it to be built with www/node6? The other two net-im/mastodon dependencies that pull in node (devel/rubygem-execjs and www/yarn) have the option to choose the node version, so users will at least be able to get Mastodon up and running if they build these three packages with non-default options.

I know this has been discussed in the past [2], but I now feel making www/node6 the default for all of the latest node ports is best for users. It's what the node developers recommend "for most users" on their site and node6 seems more stable. Could you share your thoughts on this?

[1] After installing net-im/mastodon, users have to install node modules (under www/mastodon/node_modules) manually with yarn install. (That's not ideal, but packaging several hundred node modules will be challenging. An omnibus package containing all the node modules might make sense, but there are binaries, so care must be taken.) It's during yarn install that a compile error occurs when building node-sass. See http://okturing.com/src/1525/body for the error.

[2] The rationale for recently switching www/yarn from using www/node6 to www/node by default was because other node-related ports were pulling in www/node and this was causing conflicts.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10833
Build 11225: arc lint + arc unit

Event Timeline

If changing options, you need to bump PORTREVISION.

In D11836#245464, @mat wrote:

If changing options, you need to bump PORTREVISION.

Done. Thanks.

jrm edited the test plan for this revision. (Show Details)
jrm added a subscriber: tz.

I'm totally fine with this patch.
Generally speaking, all ports depending to node should have an OPTION about the node version.
More generally speaking, I guess, I can spend some time to add USES= node and DEFAULT_VERSIONS+= node=6 to the framework, that's a more general approach.

I'm totally fine with this patch.
Generally speaking, all ports depending to node should have an OPTION about the node version.
More generally speaking, I guess, I can spend some time to add USES= node and DEFAULT_VERSIONS+= node=6 to the framework, that's a more general approach.

I have a pending PR to do just this. I submitted it long before I got my commit bit. I can push it up for review.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213947

See D11863, which I think should replace this diff.

Abandon, because @sunpoet basically committed this.