* Update README.md about resolving LTS versions
After getting #353 we can now resolve the LTS versions easily. This adds short documentation how to use the new `resolve` subcommand.
Hopefully this will make it clear for everyone how to use it 🙇
* docs: document flags for resolve subcommand
---------
Co-authored-by: Augusto Moura <me@augustomoura.com>
`asdf install` does work for alias `lts-hydrogen`, but it does not display it when running `asdf list-all nodejs`. This makes it clear that it is indeed a supported LTS alias.
node already resolves the correct prefix based on the binary location,
the problem with overriding it is that the prefix can be customized to a
different location in the .npmrc config file global. We already permit
prefix customization by setting the variable itself
If not set, [node-build defaults to a timestamped subdirectory of
`TMPDIR`](https://github.com/nodenv/node-build#custom-build-configuration),
which is exactly what we need.
This fixes https://github.com/asdf-vm/asdf-nodejs/issues/289
With this change, I see repeated builds fail in the exact same way (see
https://github.com/asdf-vm/asdf-nodejs/issues/289 for a detailed
explanation of what used to happen):
$ PATH="$PWD:$PATH" ASDF_NODEJS_FORCE_COMPILE=1 asdf install nodejs 14.18.1
Trying to update node-build... ok
WARNING: node-v14.18.1 is in LTS Maintenance mode and nearing its end of life.
It only receives *critical* security updates, *critical* bug fixes and documentation updates.
Installing node-v14.18.1...
BUILD FAILED (Arch rolling using node-build 4.9.69)
Inspect or clean up the working tree at /tmp/node-build.20220216023317.178521.tZF5cV
Results logged to /tmp/node-build.20220216023317.178521.log
Last 10 log lines:
/tmp/node-build.20220216023317.178521.tZF5cV ~/tmp/demoing
/tmp/node-build.20220216023317.178521.tZF5cV/node-v14.18.1 /tmp/node-build.20220216023317.178521.tZF5cV ~/tmp/demoing
Node.js configure: Found Python 3.9.6...
WARNING: C compiler (CC=gcc, 0.0.0) too old, need gcc 4.2 or clang 3.2
WARNING: Could not recognize `gas`:
ERROR: Did not find a new enough assembler, install one or build with
--openssl-no-asm.
Please refer to BUILDING.md
$ PATH="$PWD:$PATH" ASDF_NODEJS_FORCE_COMPILE=1 asdf install nodejs 14.18.1
Trying to update node-build... ok
WARNING: node-v14.18.1 is in LTS Maintenance mode and nearing its end of life.
It only receives *critical* security updates, *critical* bug fixes and documentation updates.
Installing node-v14.18.1...
BUILD FAILED (Arch rolling using node-build 4.9.69)
Inspect or clean up the working tree at /tmp/node-build.20220216023335.178790.u0kcPV
Results logged to /tmp/node-build.20220216023335.178790.log
Last 10 log lines:
/tmp/node-build.20220216023335.178790.u0kcPV ~/tmp/demoing
/tmp/node-build.20220216023335.178790.u0kcPV/node-v14.18.1 /tmp/node-build.20220216023335.178790.u0kcPV ~/tmp/demoing
Node.js configure: Found Python 3.9.6...
WARNING: C compiler (CC=gcc, 0.0.0) too old, need gcc 4.2 or clang 3.2
WARNING: Could not recognize `gas`:
ERROR: Did not find a new enough assembler, install one or build with
--openssl-no-asm.
Please refer to BUILDING.md