@@ -0,0 +1,62 @@
1+# Troubleshooting
2+
3+I very highly recommend asking for help on [the Elm slack](https://elmlang.herokuapp.com).
4+
5+There are a lot of things that can go wrong when installing software, and it can really help to have a second pair of eyes on your situation!
6+
7+This document goes through a couple options that may help you out!
8+
9+
10+## Can you skip npm entirely?
11+
12+The most reliable way to get Elm installed using the official installers for Mac and Windows [here][download].
13+
14+You can also download the binaries directly. On Linux, you could do it in the terminal like this:
15+
16+```bash
17+curl -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz
18+gunzip elm.gz # unzip the file
19+chmod +x elm # make the file executable
20+mv elm /usr/local/bin/ # put the executable in a directory likely to be listed in your PATH variable
21+```
22+
23+If these exact commands do not work for you, you can try to do the same thing by hand.
24+
25+[download]: https://github.com/elm/compiler/releases/tag/0.19.1
26+
27+
28+## Do you need to use npm for some reason?
29+
30+The company running npm has a list of common troubleshooting situations [here](https://npm.community/c/support/troubleshooting).
31+
32+### Firewalls
33+
34+Some companies have a firewall and want to route traffic through a proxy server.
35+
36+Usually that means you have a `HTTPS_PROXY` environment variable set on your computer.
37+
38+If you want to try to set it temporarily to see what happens, you can try something like this:
39+
40+```
41+# Mac and Linux
42+HTTPS_PROXY=http://proxy.example.com npm install -g elm
43+
44+# Windows
45+set HTTPS_PROXY=http://proxy.example.com
46+npm install -g elm
47+```
48+
49+## Do you know what a `PATH` variable is?
50+
51+When you run a command like `elm make src/Main.elm`, your computer starts by trying to find a file called `elm`.
52+
53+The `PATH` is a list of directories to search within. On Mac and Linux, you can see these directories by running:
54+
55+```
56+$ echo $PATH
57+/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin
58+```
59+
60+The are separated by `:` for some reason. So running `elm make src/Main.elm` starts by searching the `PATH` for files named `elm`. On my computer, it finds `/usr/local/bin/elm` and then can actually run the command.
61+
62+Is `elm` in one of the directories listed in your `PATH` variable? I recommend asking for help if you are in this scenario and unsure how to proceed.