From 5510f3c44b17e17691be1db537d00611daa427ad Mon Sep 17 00:00:00 2001 From: Brandon Scott Date: Thu, 12 Sep 2019 22:01:19 -0500 Subject: [PATCH] Update npm-eacces-errors.md Why the heck did I copy "backup your computer" for changing a simple npm setting? Linux isn't that fragile. --- npm-eacces-errors.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/npm-eacces-errors.md b/npm-eacces-errors.md index 59c3748..d072a9f 100644 --- a/npm-eacces-errors.md +++ b/npm-eacces-errors.md @@ -2,32 +2,31 @@ ## Resolving EACCES permissions errors when installing packages globally -1. Back up your computer. -2. On the command line, in your home directory, create a directory for global installations: +1. On the command line, in your home directory, create a directory for global installations: ``` mkdir ~/.npm-global ``` -3. Configure npm to use the new directory path: +2. Configure npm to use the new directory path: ``` npm config set prefix '~/.npm-global' ``` -4. In your preferred text editor, open or create a `~/.profile` file and add this line: +3. In your preferred text editor, open or create a `~/.profile` file and add this line: ``` export PATH=~/.npm-global/bin:$PATH ``` -5. On the command line, update your system variables: +4. On the command line, update your system variables: ``` source ~/.profile ``` -6. To test your new configuration, install a package globally without using `sudo`: +5. To test your new configuration, install a package globally without using `sudo`: ``` npm install -g jshint