Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Unsupported version of node #19019

Closed
1 of 4 tasks
ilog2000 opened this issue Oct 31, 2017 · 71 comments
Closed
1 of 4 tasks

Unsupported version of node #19019

ilog2000 opened this issue Oct 31, 2017 · 71 comments

Comments

@ilog2000
Copy link

ilog2000 commented Oct 31, 2017

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

"npm install" gives an error after installing node.js v9.0.0

npm WARN npm npm does not support Node.js v9.0.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/
C:\Program Files\nodejs\node.exe: src\node_zlib.cc:430: Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.

How can the CLI team reproduce the problem?

Install node.js v9.0.0, open any project, type:
npm install

supporting information:

  • npm -v prints: 5.5.1
  • node -v prints: v9.0.0
  • npm config get registry prints: npm WARN npm npm does not support Node.js v9.0.0
  • Windows, OS X/macOS, or Linux?: Windows 10
@amritk
Copy link

amritk commented Oct 31, 2017

Here's the issue from the node repo
nodejs/node#16649

@addaleax
Copy link
Contributor

addaleax commented Oct 31, 2017

For now, you should be able to work around this

  • by using npmc rather than npm, i.e. npx npmc install instead of npm install; or
  • by using the version of npm that is bundled with Node 9 edit: see Unsupported version of node #19019 (comment) for how to do that; or
  • by downgrading to npm@5.3.x: [sudo] npm install -g npm@5.3.x

The “real” fix would be waiting for the next npm release.

@ilovezfs
Copy link

ilovezfs commented Nov 1, 2017

Is there an ETA until the next npm release? In Homebrew we're planning to withhold node 9 indefinitely until npm has a compatible release.

@ilog2000
Copy link
Author

ilog2000 commented Nov 1, 2017

Thank you for work around. I simply use yarn as for now, it shows a warning but works. I am just not sure if it is possible to upgrade npm with it after new version is out.

@LayZeeDK
Copy link

LayZeeDK commented Nov 1, 2017

Uninstalling previous version of Node as well as deleting %AppData%\npm and %AppData%\npm-cache and then installing Node 9.0.0 worked for me. However, I had to install my globally installed packages again.

@ilog2000
Copy link
Author

ilog2000 commented Nov 1, 2017

Thank you, uninstall Node v9.0.0, delete npm & npm-cache, then re-install Node v9.0.0 works for me as well.

@hatzipanis
Copy link

This is failing when building on Heroku but I'm not sure if this is the correct issue. Any ideas here?

@iwadam
Copy link

iwadam commented Nov 3, 2017

@hatzipanis Try this solution: https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Basically you have to specify node version in your package.json file like this:

"engines": {
   "node": "8.x"
 }

@kenany kenany mentioned this issue Nov 5, 2017
13 tasks
@MuhammadHasham23
Copy link

MuhammadHasham23 commented Nov 5, 2017

I've just upgraded to Node v9 and ran into the same issue.Following the advice to uninstall a global instance of npm has resolved the issue for me, using:

npm uninstall -g npm

This caused my system to fall back on the version of npm installed by node 9.0.0, thereby resolving the warning.

@cybernetics
Copy link

@LayZeeDK I just deleted %AppData%\npm and %AppData%\npm-cache and then I reran node-v9.1.0-x64.msi setup without uninstalling existing node first. It prompted me to repair the existing setup and I went ahead with. after that I was able to run npm command.

npm -v
5.5.1

it saved me from the hassle of uninstalling & installation of global packages again.

@jameswomack
Copy link

jameswomack commented Nov 13, 2017

Looks like it has to do with npm/lib/utils/unsupported.js

var supportedNode = [
  {ver: '4', min: '4.7.0'},
  {ver: '6', min: '6.0.0'},
  {ver: '7', min: '7.0.0'},
  {ver: '8', min: '8.0.0'}
]

@ghost
Copy link

ghost commented Nov 13, 2017

Also had the same issue

@Yonezpt
Copy link

Yonezpt commented Nov 13, 2017

Followed @MohammadHasham steps in #19019 (comment) and the issue went away in node 9.1.0 update

@duggum
Copy link

duggum commented Nov 13, 2017

@jameswomack said:

Looks like it has to do with npm/lib/utils/unsupported.js

That's it for sure. It looks like the Node.js folks may have just updated the unsupported file on their own.

//  This is from Node 9.1.0's npm/lib/utils/unsupported.js
var supportedNode = [
  {ver: '4', min: '4.7.0'},
  {ver: '6', min: '6.0.0'},
  {ver: '7', min: '7.0.0'},
  {ver: '8', min: '8.0.0'},
  {ver: '9', min: '9.0.0'}
]

The question is, what's the reason the npm folks haven't made such a simple change? Are they still testing compatibility before updating? If that's the case, then why would the node folks just make a potentially risky change before compatibility testing is finished?

@kenany
Copy link
Contributor

kenany commented Nov 13, 2017

Since it hasn't been linked here yet, #18964 is the PR which adds v9 to that supportedNode array 👍

@mutantkeyboard
Copy link

@MohammadHasham that did the trick for me too.

@djnaumov
Copy link

I think that I have the same issue with node 9.2.0

npm WARN npm npm does not support Node.js v9.2.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/
WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.atus
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
C:\Program Files\nodejs\node.exe: src\node_zlib.cc:437: Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.

@bonesoul
Copy link

Yep same with 9.2.0

@rjdesignz
Copy link

I am having similar issues as well. Not able to run npm after upgrading to Node 9.2.0
Even uninstall of npm isn't working. It gives me error as follows:

rj$ npm uninstall -g npm
npm WARN npm npm does not support Node.js v9.2.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/
up to date in 0.057s

@dnalborczyk
Copy link

wow, node v9.0 has been released almost a month ago. the ignorance of the npm folks speaks volumes, specially after putting a lot of afford into catching up with yarn and trying to regain user trust.

@ilovezfs is it possible to point the brew script to the node modified package?

@ilovezfs
Copy link

@dnalborczyk many workarounds are possible, but as you can see from this issue itself, they lead to chaos.

@robcresswell
Copy link

@dnalborczyk No need to insult them. Keep it civil and just ask for a tag.

@dnalborczyk
Copy link

@robcresswell you're joking, right?

@ilovezfs
Copy link

@dnalborczyk you should read, or re-read, the Code of Conduct

@dnalborczyk
Copy link

I don't really see how the above is an insult, just my personal opinion on that matter.

Not a single word or statement from npm regarding this issue, and I can give you guys plenty of references and cc's where people have asked for almost a month now.

npm is backed by npm, Inc. - and I'm more referring to the corporate entity, than the open source project.

Unfortunately npm is pretty much baked into node, and users are not given a choice of alternatives, and so here we are ...

@robcresswell
Copy link

@dnalborczyk I'm not joking. I also don't think saying "it's my opinion" is a valid way of defending an insult. The team (who are humans, not corporate robots) are clearly overburdened (1000+ issues) so I'd assume there is more to the story than them just being "ignorant". Just request prioritisation politely and apply a workaround in the meantime. It's a little inconvenient, but that's life, especially when you're dealing with software that costs you no money or time.

nexdrew added a commit to sywac/sywac that referenced this issue Nov 27, 2017
nexdrew added a commit to sywac/sywac that referenced this issue Nov 27, 2017
* chore: do not install latest npm on Node 9

  see npm/npm#19019
@robertmain
Copy link

robertmain commented Nov 27, 2017

👍 +1 on this issue

@zkat
Copy link
Contributor

zkat commented Nov 28, 2017

I spoke to @MylesBorins about this, but I'm literally cooking up the next release of npm right now. It'll go into next once that's done, and y'all should wait a week to merge it into node, because we want to make sure there's no surprises, since it does involve some nontrivial refactorings and a couple new features. It should be ready for Node to consume by next Thursday (7 Dec).

@MylesBorins
Copy link

Thanks for the update and hard work @zkat!

@zkat
Copy link
Contributor

zkat commented Nov 28, 2017

https://twitter.com/maybekatz/status/935357840872554496 And it's out.

Please go ahead and try it out. We'll be watching for early warnings on breakage for the next week to make sure everything looks ok. Thanks y'all for your patience. It's been a hell of a couple of months for the team :s

@zkat zkat closed this as completed Nov 28, 2017
@ilovezfs
Copy link

Thanks @zkat! You're awesome :)

@magiksd
Copy link

magiksd commented Nov 28, 2017

Hello, I'm stuck with npm 5.5.1 on Node.js 9.2.0, I can't update npm with "npm i -g npm" or "npm i -g npm@next", I'm getting this error :

$ npm i -g npm@next
npm WARN npm npm does not support Node.js v9.2.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/
WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
/usr/bin/node[23747]: ../src/node_zlib.cc:437:static void node::{anonymous}::ZCtx::Init(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
 1: node::Abort() [npm]
 2: node::Assert(char const* const (*) [4]) [npm]
 3: 0x1255aff [npm]
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [npm]
 5: 0xb77f9c [npm]
 6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [npm]
 7: 0x2d3e12842fd
Aborted

@magiksd
Copy link

magiksd commented Nov 28, 2017

Found a "solution" :

npm remove -g npm
apt-get install --reinstall nodejs
npm i -g npm@next

@ilovezfs
Copy link

brew install --devel node will now give you node 9.2.0 + npm 5.6.0

@Evanto
Copy link

Evanto commented Dec 5, 2017

I've started having this npm does not support Node.js v9.2.0 issue along with:

eva@eva-CR70-2M-CX70-2OC-CX70-2OD:~/Develop/Netlify/pizza4$ ws --spa index.htmlServing at http://eva-CR70-2M-CX70-2OC-CX70-2OD:8050, http://127.0.0.1:8050, http://192.168.0.103:8050
12:09:20: Middleware error
Error: ENOENT: no such file or directory, stat '/home/eva/Develop/Netlify/pizza4/src/index.html'

Are they related? My project worked fine previously, so I'm guessing ENOENT err is not about code, is it some conflict in software or a result of incompatible node/npm versions?
Also I have npm update check failed.

I tried I think every solution offered in this thread, but can't get rid of ENOENT and npm update check failed.
Ubuntu 16.04.3 LTS
Nodejs v9.2.0
npm 5.6.0

@mutantkeyboard
Copy link

@Evanto try doing npm install --no-optional, and see what it returns.

@Evanto
Copy link

Evanto commented Dec 5, 2017

@mutantkeyboard

eva@eva-CR70-2M-CX70-2OC-CX70-2OD:~/Develop/Netlify/pizza4$ sudo npm install --no-optional

npm WARN logo.pizza@2.0.0 No repository field.
npm WARN logo.pizza@2.0.0 No license field.
npm WARN The package gulp-jshint is included as both a dev and production dependency.
npm WARN The package gulp-uglify is included as both a dev and production dependency.
npm WARN The package jshint is included as both a dev and production dependency.

up to date in 1.122s

@cloakedninjas
Copy link

Downloaded the 9.2.0 package from the NodeJS homepage and have ended up here... So looks like this is still an issue?

@robcresswell
Copy link

@cloakedninjas Could you give some more information or open a new issue? Just commenting "me too" on a closed bug is not terribly helpful :)

@cloakedninjas
Copy link

Unfortunately I didn't keep my shell output, but after some digging around node-gyp, it looks like my specific issue was related to deps of deps. Specifically webpack and fsevents, bumping to latest webpack release allowed me to install without issue.

@thornjad
Copy link

thornjad commented Dec 8, 2017

Node 9.2.1 + npm 5.6.0 using nvm seems to be all back to normal!

@zkat
Copy link
Contributor

zkat commented Dec 8, 2017

npm@5.6.0 became latest yesterday. I'm locking this now.

@npm npm locked and limited conversation to collaborators Dec 8, 2017
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