Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

npm does not work with node.js Version 9 (which it is forced to in TrueOS) #1503

Closed
NorwegianRockCat opened this issue Nov 20, 2017 · 3 comments

Comments

@NorwegianRockCat
Copy link

The current version of npm doesn't work on the latest unstable (67a4643eb)

npm will return this error when being run:

npm WARN npm npm does not support Node.js v9.1.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.
npm WARN npm You can find the latest version at https://nodejs.org/

The current tree doesn't build Node.js 7 or 8. 6 forces you to use a much older of npm.

Ports tree revision 454516 includes the necessary fix to make it work (that is npm-5.4.2_2).

@q5sys
Copy link
Member

q5sys commented Nov 27, 2017

Thanks for the report, we'll look into this. By any chance have you checked to see if you get the same error under FreeBSD 12.Current?

@NorwegianRockCat
Copy link
Author

NorwegianRockCat commented Nov 27, 2017

No, I didn't. Not enough machines around.

However, even the hardcoded fix I linked to above doesn't help things out well. Other errors happen, that version of npm really shouldn't run with Node 9 I guess.

My final solution was to build node.js 8 myself (enabling its OpenSSL bindings since it can't be built with LibreSSL) and then building npm with node8 support. Then things started working again.

I'm not a giant Node user, I was just trying to run a couple of utilities others had written and ran into these error messages.

No idea what's the correct solution here. I suspect the Node maintainers are puzzling it out themselves.

@beanpole135
Copy link
Member

It looks like the "node" port was simply moved from node 8 to node 9, but the npm option for "node8" was still pointing to the top-level "node" port (now node9). I just fixed the option to have it point at the node8 port.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants