Skip to content

Commit e83ede8

Browse files
committed
improve Node.js and elm-test instructions
1 parent 8b4fd5a commit e83ede8

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -38,35 +38,40 @@ The following command will install Node.js v10 and `npm`:
3838
```
3939
sudo apt-get update
4040
sudo apt-get install nodejs npm
41-
npm install -g npm@latest
4241
```
43-
Then logout/login.
4442

4543
It is advised to configure npm to store packages in a user directory.
4644
Add to `~/.bashrc`:
4745
```
4846
NPM_PACKAGES="$HOME/.npm-packages"
49-
PATH="$NPM_PACKAGES/bin:$PATH"
47+
export PATH="$NPM_PACKAGES/bin:$PATH"
5048
# Unset manpath so we can inherit from /etc/manpath via the `manpath` command
5149
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
5352
```
5453
and run
5554
```
5655
npm config set prefix ~/.npm-packages
5756
```
5857
Then logout/login.
5958

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+
6065
## elm-test
6166
You can install `elm-test` globally:
6267
```
6368
npm install -g elm-test --ignore-scripts
6469
```
6570
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:
6873
```
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
7075
```
7176

7277
## Known issues

0 commit comments

Comments
 (0)