Opened 4 years ago

Closed 2 years ago

#61214 closed defect (fixed)

npm6: nodejs dep on older systems

Reported by: iefdev (Eric F) Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: Cc:
Port: npm6, nodejs14

Description

I have a question about the depends_lib in npm6.

platform darwin {
    if {${os.major} < 13} {
        depends_lib-replace path:bin/node:nodejs14 path:bin/node:nodejs8
    }
}

I've had NodeJS installed via the pkg from their site – which has worked fine for me on Lion. Current is node 14.12 + npm 6.14.

So, when moving over to the MP versions, I was a little surprised when npm6 wanted to give me nodejs8 instead.

nodejs14 installed fine for me:

$ port -v installed nodejs14
The following ports are currently installed:
  nodejs14 @14.12.0_0 (active) platform='darwin 11' archs='x86_64' date='2020-09-23T06:31:18+0200'

And since the dep in npm6 is: path:bin/node: ... – it installed fine after that.


What's the reason behind the nodejs8 requirement? …or perhaps it was a time when newer versions of nodejs didn't build earlier?

Also, nodejs{8,14} are conflicts to each other, so it's difficult to get nodejs14 if I installed npm6 first.

Change History (3)

comment:1 Changed 4 years ago by kencu (Ken)

I fixed up a bunch of the node ports for older systems a few years ago, and perhaps others did too....

This commit must predate that fixup, I guess. <https://github.com/macports/macports-ports/commit/a2abec4b0464639781c9214e5bc54ffe18878c4b>..

And there's one prior that started it.

comment:2 in reply to:  1 Changed 4 years ago by iefdev (Eric F)

Replying to kencu:

I fixed up a bunch of the node ports for older systems a few years ago, and perhaps others did too....

This commit must predate that fixup, I guess. <https://github.com/macports/macports-ports/commit/a2abec4b0464639781c9214e5bc54ffe18878c4b>..

And there's one prior that started it.

Ah, so it's maybe there because of earlier build failures.

nodejs14 builds from 10.7 and up: https://ports.macports.org/port/nodejs14/summary

So, perhaps it could/should be changed to:

    if {${os.major} < 11} {

comment:3 Changed 2 years ago by evanmiller (Evan Miller)

Resolution: fixed
Status: assignedclosed

In 7056ddea7c967cc61740d07dfc972a591a3507a4/macports-ports (master):

npm[6-8]: depend on nodejs14 on 10.8 and earlier

Closes: #61214

Note: See TracTickets for help on using tickets.