From 48e4a48ee2250c059590ae0d6c43081c54b35e3a Mon Sep 17 00:00:00 2001 From: Mark Kohler Date: Sat, 12 May 2018 10:10:07 -0700 Subject: [PATCH] Explain how to make npm -g installs work on Ubuntu. --- installers/npm/README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/installers/npm/README.md b/installers/npm/README.md index 7c4d067e..02ccd035 100644 --- a/installers/npm/README.md +++ b/installers/npm/README.md @@ -27,10 +27,23 @@ $ set HTTPS_PROXY=$YourProxyServer$ $ npm install -g elm ``` +## Installing on Debian/Ubuntu + +1. On Debian/Ubuntu systems, install the nodejs-legacy package and npm packages. + +``` + $ sudo apt-get install nodejs-legacy npm +``` + +2. Then [configure npm](https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-two-change-npms-default-directory) +to do "-g" global installs in your home directory. This is how you avoid using sudo! + +3. *Then* `npm install -g elm` should run with no errors. + ## Troubleshooting 1. [Troubleshooting npm](https://github.com/npm/npm/wiki/Troubleshooting) -2. On Debian/Ubuntu systems, you may have to install the nodejs-legacy package: `apt-get install nodejs-legacy`. + 3. If the installer says that it cannot find any usable binaries for your operating system and architecture, check the [Build from Source](https://github.com/elm-lang/elm-platform/blob/master/README.md#build-from-source) documentation. ## Getting Started