@@ -38,35 +38,40 @@ The following command will install Node.js v10 and `npm`:
38
38
```
39
39
sudo apt-get update
40
40
sudo apt-get install nodejs npm
41
- npm install -g npm@latest
42
41
```
43
- Then logout/login.
44
42
45
43
It is advised to configure npm to store packages in a user directory.
46
44
Add to ` ~/.bashrc ` :
47
45
```
48
46
NPM_PACKAGES="$HOME/.npm-packages"
49
- PATH="$NPM_PACKAGES/bin:$PATH"
47
+ export PATH="$NPM_PACKAGES/bin:$PATH"
50
48
# Unset manpath so we can inherit from /etc/manpath via the `manpath` command
51
49
unset MANPATH # delete if you already modified MANPATH elsewhere in your configuration
52
- MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
50
+ export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
51
+ unset NPM_PACKAGES
53
52
```
54
53
and run
55
54
```
56
55
npm config set prefix ~/.npm-packages
57
56
```
58
57
Then logout/login.
59
58
59
+ You probably want to update to the latest npm version at this point:
60
+ ```
61
+ npm install -g npm@latest
62
+ ```
63
+ Then logout/login again.
64
+
60
65
## elm-test
61
66
You can install ` elm-test ` globally:
62
67
```
63
68
npm install -g elm-test --ignore-scripts
64
69
```
65
70
But it won't run without an ` elmi-to-json ` binary suitable for the platform,
66
- which is not available upstream, so you have to copy manually the one provided
67
- by this release to the expected location:
71
+ which is not available upstream.
72
+ So we will make a link, in the expected location, to the one provided by this release :
68
73
```
69
- cp /usr/local/bin/elmi-to-json $(npm config get prefix)/lib/node_modules/elm-test/node_modules/elmi-to-json/bin/elmi-to-json
74
+ ln -sft $(npm config get prefix)/lib/node_modules/elm-test/node_modules/elmi-to-json/bin /usr/local /bin/elmi-to-json
70
75
```
71
76
72
77
## Known issues
0 commit comments