asdf updateasdf local nodejs version, asdf global nodejs version or trigger by a .tool-versions file.npm -v should print the npm version.
It prints No such command in 8.4.0 of nodejs. However, when I checkout the _v0.3.0_ branch in .asdf folder, it works correctly.
https://github.com/asdf-vm/asdf-nodejs/issues/22
OS:
macOS 10.13
asdf version:
v0.4.0
Confirm I had the same issue 4.0.0 breaks the reshim functionality. But after checking out the 3.0 tag and reinstalling nodejs under 3.0 followed by running asdf update seems to have "fixed it" for now but their might be something wrong with the installation/shimming in 4.0 or could be a quirk of upgrading.
Thanks for reporting. Do you have the latest version of asdf-nodejs?
Please try asdf plugin-update nodejs and let me know if reshim is still broken.
Version 0.4 could be incompatible with old versions of asdf-nodejs.
We really need versioning for plugins, but this is another topic.
Yes latest version of nodejs and asdf seem to work fine. So probably an issue related to small changes during the interim between updates. Versioning of the plugins wouldn't be a bad idea at all.
Confirm. After pulling the latest master branch of asdf, the npm command works. Although npm install -g npm follow by asdf reshim doesn't update the npm module, but it might be a different issue.
Wondering if we should close this ticket. Issue another one if https://github.com/asdf-vm/asdf-nodejs/issues/57 is related with asdf itself.
Same error here with asdf-0.4.0 and nodejs-6.11.4 (LTS). Imho the latest LTS version of nodejs should be supported.
@fpauser Wondering have you try to pull the master branch in the ~/.asdf directory? That's how it works for me.
@taiansu My ~/.asdf sits on current master @ 8946fbd3. I tried it with LTS node 6.11.4 and latest node-8.7.0 without success. Just found out that nodejs-6.11.1 works for me.
Deleting the ~/.asdf/shims directory and doing a asdf reshim nodejs fixed the issue for me.
Related issue in asdf-nodejs: https://github.com/asdf-vm/asdf-nodejs/issues/56.
I'm closing this issue since both seem to be the same issue as #284.
Most helpful comment
Deleting the
~/.asdf/shimsdirectory and doing aasdf reshim nodejsfixed the issue for me.Related issue in asdf-nodejs: https://github.com/asdf-vm/asdf-nodejs/issues/56.