From b16093e8ef4b658a36ed339d0a219949194d2d6c Mon Sep 17 00:00:00 2001 From: isaacs Date: Sat, 26 Nov 2011 23:25:32 -0800 Subject: Make readme a bit more accurate --- README.md | 116 +++++++++++++++++++++++++++++--------------------------------- 1 file changed, 54 insertions(+), 62 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index df1fdfc25..d5e285ab0 100644 --- a/README.md +++ b/README.md @@ -9,91 +9,75 @@ Much more info available via `npm help` once it's installed. ## IMPORTANT -**You need node v0.4 or higher to run this program.** +**You need node v0.6 or higher to run this program.** To install an old **and unsupported** version of npm that works on node 0.3 and prior, clone the git repo and dig through the old tags and branches. -## Simple Install (Unix only, sorry) +## Super Easy Install -To install npm with one command, do this: - - curl http://npmjs.org/install.sh | sh +npm comes with node now. -To skip the npm 0.x cleanup, do this: - - curl http://npmjs.org/install.sh | clean=no sh +### Windows Computers -To say "yes" to the 0.x cleanup, but skip the prompt: +Get the MSI. npm is in it. - curl http://npmjs.org/install.sh | clean=yes sh +### Apple Macintosh Computers -If you get permission errors, see the section below, entitled -"Permission Errors on Installation". +Get the pkg. npm is in it. -## Installing on Windows -- Experimental +### Other Sorts of Unices -Yes, this sucks. A convenient one-liner is coming soon. +Run `make install`. npm will be installed with node. -### Step 1: Drop the node.exe somewhere +If you want a more fancy pants install (a different version, customized +paths, etc.) then read on. -You will probably need the latest version of node, **at least** version -`0.5.8` or higher. You can get it from -. +## Fancy Install (Unix) -### Step 2 (optional): Update the %PATH% environment variable +To install npm with one command, do this: -Update your `%PATH%` environment variable in System Properties: -Advanced: Environment, so that it includes the `bin` folder you chose. -The entries are separated by semicolons. + curl http://npmjs.org/install.sh | sh -You *may* be able to do this from the command line using `set` and -`setx`. `cd` into the `bin` folder you created in step 1, and do this: +To skip the npm 0.x cleanup, do this: - set path=%PATH%;%CD% - setx path "%PATH%" + curl http://npmjs.org/install.sh | clean=no sh -This will have the added advantage that you'll be able to simply type -`npm` or `node` in any project folder to access those commands. +To say "yes" to the 0.x cleanup, but skip the prompt: -If you decide not to update the PATH, and put the node.exe file in -`C:\node\node.exe`, then the npm executable will end up `C:\node\npm.cmd`, -and you'll have to type `C:\node\npm ` to use it. + curl http://npmjs.org/install.sh | clean=yes sh -### Step 3: Install git +If you get permission errors, you'll need to **run** the script as root. +(Note, just putting `sudo` in front of the `curl` will **fetch** the script +as root.) -If you don't already have git, -[install it](https://git.wiki.kernel.org/index.php/MSysGit:InstallMSysGit). +### Slightly Fancier -Run `git --version` to make sure that it's at least version 1.7.6. +You can set any npm configuration params with that script: -### Step 4: install npm + curl http://npmjs.org/install.sh | npm_config_prefix=/some/path sh -Lastly, **after** node.exe, git, and your %PATH% have *all* been set up -properly, install npm itself: +Or, you can run it in uber-debuggery mode: - git config --system http.sslcainfo /bin/curl-ca-bundle.crt - git clone --recursive git://github.com/isaacs/npm.git - cd npm - node cli.js install npm -gf + curl http://npmjs.org/install.sh | npm_debug=1 sh -## Permission Errors (`EACCES` or `EACCESS`) on Installation +### Even Fancier -On Windows, you may need to run the command prompt in elevated -permission mode. (Right-click on cmd.exe, Run as Administrator.) +Get the code with git. Use `make` to build the docs and do other stuff. +If you plan on hacking on npm, `make link` is your friend. -On Unix, you may need to run as root, or use `sudo`. +If you've got the npm source code, you can also semi-permanently set +arbitrary config keys using the `./configure --key=val ...`, and then +run npm commands by doing `node cli.js `. (This is helpful +for testing, or running stuff without actually installing npm itself.) -**Note**: You would need to `sudo` the `sh`, **not** the `curl`. Fetching -stuff from the internet typically doesn't require elevated permissions. -Running it might. +## Fancy Windows Install -I highly recommend that you first download the file, and make sure that -it is what you expect, and *then* run it. +You can download a zip file from , and unpack it +in the same folder where node.exe lives. - curl -O http://npmjs.org/install.sh - # inspect file.. - sudo sh install.sh +If that's not fancy enough for you, then you can fetch the code with +git, and mess with it directly. ## Installing on Cygwin @@ -116,12 +100,6 @@ terminal, then you've already got the code. Just do: and npm will install itself. -If you don't have make, and don't have curl or git, and ALL you have is -this code and node, you can probably do this: - - git submodule update --init --recursive - sudo node ./cli.js install -g - Note that github tarballs **do not contain submodules**, so those won't work. You'll have to also fetch the appropriate submodules listed in the .gitmodules file. @@ -218,8 +196,7 @@ help config` to learn about all the options you can set there. ## More Docs Check out the [docs](http://npmjs.org/doc/), -especially the -[faq](http://npmjs.org/doc/faq.html). +especially the [faq](http://npmjs.org/doc/faq.html). You can use the `npm help` command to read any of them. @@ -266,6 +243,21 @@ process for published modules. If this concerns you, inspect the source before using packages. +## BUGS + +When you find issues, please report them: + +* web: + +* email: + + +Be sure to include *all* of the output from the npm command that didn't work +as expected. The `npm-debug.log` file is also helpful to provide. + +You can also look for isaacs in #node.js on irc://irc.freenode.net. He +will no doubt tell you to put the output in a gist or email. + ## SEE ALSO * npm(1) -- cgit v1.2.3