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

[DOCS] Clarify Requirements and Installation section #7913

Closed
2 tasks done
GervaseFT opened this issue Nov 15, 2024 · 5 comments
Closed
2 tasks done

[DOCS] Clarify Requirements and Installation section #7913

GervaseFT opened this issue Nov 15, 2024 · 5 comments
Labels
Documentation documentation related issue Needs Triage needs review for next steps

Comments

@GervaseFT
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

This is a CLI Docs Enhancement, not another kind of Docs Enhancement.

  • This is a CLI Docs Enhancement.

Description of Problem

README.md is displayed when going to "https://github.com/npm/cli".

Currently, README.md is the following:

Requirements

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'.

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":

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.

Docs URL

https://github.com/npm/cli/blob/latest/README.md

@GervaseFT GervaseFT added Documentation documentation related issue Needs Triage needs review for next steps labels Nov 15, 2024
@GervaseFT GervaseFT changed the title [DOCS] <title> [DOCS] Clarify Requirements and Installation section Nov 15, 2024
@GervaseFT
Copy link
Author

I just followed the below instruction on MacOS...

curl -qL https://www.npmjs.com/install.sh | sh

...and got...

% 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...

@Idiakeosemoahu
Copy link

@osemoahu idiake

@Idiakeosemoahu
Copy link

FB_IMG_1731517582292

@Idiakeosemoahu
Copy link

Idiakeosemoahu commented Nov 20, 2024

Me

@milaninfy
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation documentation related issue Needs Triage needs review for next steps
Projects
None yet
Development

No branches or pull requests

3 participants