Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing lts versions is broken #299

Closed
git-rz opened this issue Apr 29, 2022 · 6 comments
Closed

Installing lts versions is broken #299

git-rz opened this issue Apr 29, 2022 · 6 comments

Comments

@git-rz
Copy link

git-rz commented Apr 29, 2022

image

commit aded55b was the last one to allow installing lts versions.

commit 5d34772 and after show many hundred lines of output regarding unbound variable access before giving "node-build: definition not found: lts-gallium"

I first noticed the problem in a docker build based on ubuntu, and then reproduced it on osx / homebrew.

I need to go back to commit f9957f3 to make it work in the Ubuntu container build, whereas aded55b works for the Mac.

@augustobmoura
Copy link
Member

This looks like a broken request in the past. Try clearing your cache by running rm -rf $ASDF_DIR/tmp/nodejs

@augustobmoura
Copy link
Member

I had this problem before but after removing the cache it solve itself. I think we added an incompatibility with previous cache files. If we are having the problem even after clearing the cache, I might give a deeper investigation

@git-rz
Copy link
Author

git-rz commented Apr 29, 2022

Cleaning the cache fixed the issue. Looks like I will need to automate cache removal.

From a user point of view, and especially if this is now a recurring issue, it would help if asdf-nodejs cleaned the cache automatically when needed.

@valentine
Copy link

This just happened to me as well, and clearing the cache also seemed to have fixed the issue and allowed me to install new nodejs versions fine.

I do get this error once after clearing the cache (not repeated like the one in the first post):
/Users/valentine/.asdf/plugins/nodejs/bin/../lib/utils.sh: line 82: printf: write error: Broken pipe

@taybin
Copy link

taybin commented Jul 28, 2022

I just had this happen to me as well. Clearing the cache fixed it.

@augustobmoura
Copy link
Member

We changed the way aliases work on #348, now you need to explicitly opt-in with dynamic ranges on legacy version files (.tool-versions and .nvmrc). The .tool-versions file doesn't support non-deterministic versions, and supporting it on .tool-versions is not a feature we are seeking to implement at the moment.

To enable it, you need to provide an ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY environment variable choosing between the latest_available and latest_installed strategies, you can read more about it in the appropriate section on the README of the project. To make this choice permanent you can export said variable from your shell rc file like so:

export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY=latest_installed
# OR
export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY=latest_available

Please update the plugin by running asdf plugin-update nodejs. If a new issue arises with the new implementation please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants