Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeJs v12.18.3 not supported by bundled npm v5.5.1 on Ubuntu 20 #2871

Closed
abhishekmadhu opened this issue Jul 22, 2020 · 3 comments
Closed

Comments

@abhishekmadhu
Copy link

I installed node.js LTS (v12) using instructions here

Upon installation, I see proper results with node -v (v12.18.3) and npm -v (v5.5.1)

But trying to use npm throws an error:

*** $ npm i underscore
npm WARN npm npm does not support Node.js v12.18.3
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/
npm ERR! cb.apply is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/*****/.npm/_logs/2020-07-22T22_56_12_979Z-debug.log

My OS information is here:

NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04 LTS"
VERSION_ID="20.04"
UBUNTU_CODENAME=focal
@abhishekmadhu
Copy link
Author

Contents of /home/*****/.npm/_logs/2020-07-22T22_56_12_979Z-debug.log (if required)

0 info it worked if it ends with ok
1 warn npm npm does not support Node.js v12.18.3
2 warn npm You should probably upgrade to a newer version of node as we
3 warn npm can't make any promises that npm will work with this version.
4 warn npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.
5 warn npm You can find the latest version at https://nodejs.org/
6 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'i', 'underscore' ]
7 info using npm@5.5.1
8 info using node@v12.18.3
9 verbose npm-session 924c9e704e2f2a7c
10 silly install loadCurrentTree
11 silly install readLocalPackageData
12 verbose stack TypeError: cb.apply is not a function
12 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
12 verbose stack     at FSReqCallback.oncomplete (fs.js:169:5)
13 verbose cwd /usr/bin
14 verbose Linux 5.4.0-40-generic
15 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "i" "underscore"
16 verbose node v12.18.3
17 verbose npm  v5.5.1
18 error cb.apply is not a function
19 verbose exit [ 1, true ]

@addaleax addaleax transferred this issue from nodejs/node Jul 22, 2020
@addaleax
Copy link
Member

Hey, and thanks for the report!

I’m moving this over to nodejs/help, because this isn’t really actionable for us as a bug report. It’s primarily a problem with npm, and Node.js only tries to guarantee that the version of npm that we ship with it works, not older npm versions (which sometimes rely on Node.js internals to a degree that we cannot control and that is not reasonable to expect from us to maintain, which includes this particular error).

It’s also not something that npm can do anything about, because they are not in control of the version that Ubuntu ships, and cannot modify outdated already-published versions (the most recent npm@5 release was 5.10.0, not 5.5.1).

I’d suggest that you reach out to the Ubuntu maintainers team in order to have this addressed.

@abhishekmadhu
Copy link
Author

Hey @addaleax
Thanks for the quick response. I did some research on this (I am new to Node.js) and your suggestion really helped.
I could set this up properly with my other computers (Windows) with no additional issues.

I will raise a bug with the Ubuntu maintainers when I have time.
Thanks again!

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

No branches or pull requests

2 participants