You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the following versions of Node.js must be installed to run npm:
18.x.x >= 18.17.0
20.5.0 or higher
Installation
npm comes bundled with node, & most third-party distributions, by default.
This confused me because according to the Requirements section, I thought I needed to pre-install 'Node.js'. But, according to the Installation section, it gets automatically installed when I install 'npm'.
Only node.js [installation] packages comes with npm. so if you are installing using an .msi, .exe, .dmg .pkg, .deb or using a package installer like apt-get, yum or brew, then you'll have both node and npm.
However,npm is not part of the node core. if you are installing node and using a method where you are using ./configure or make install || make link, then npm will not be installed
Would it be OK to have something similar to the above be put into the "README.md"?
If the above stackoverflow.com comment were in "README.md", it would have saved about 30 minutes of my time.
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3755 100 3755 0 0 4671 0 --:--:-- --:--:-- --:--:-- 4705 npm cannot be installed without node.js. install node first, and then try again.
It would be nice to add to the clarification that "install.sh" is not an installation package. Though really I suppose I should have known...
As clearly mentioned in readme that you need to have node.js installed, yes npm comes with node js by default but for some reasons e.g. by user action or some side effects if it's not accessible or removed then the direct download script will help reinstall npm. This doesn't seem to be issue with docs.
Is there an existing issue for this?
This is a CLI Docs Enhancement, not another kind of Docs Enhancement.
Description of Problem
README.md is displayed when going to "https://github.com/npm/cli".
Currently, README.md is the following:
This confused me because according to the Requirements section, I thought I needed to pre-install 'Node.js'. But, according to the Installation section, it gets automatically installed when I install 'npm'.
Is it possible to make the wording clearer?
Potential Solution
I had to search around a little to find the following comment from "https://stackoverflow.com/a/25232555":
Would it be OK to have something similar to the above be put into the "README.md"?
If the above stackoverflow.com comment were in "README.md", it would have saved about 30 minutes of my time.
Docs URL
https://github.com/npm/cli/blob/latest/README.md
The text was updated successfully, but these errors were encountered: