Asdf: v0.4.0 brokes nodejs plugin's reshim

Created on 11 Oct 2017  路  9Comments  路  Source: asdf-vm/asdf

Steps to reproduce

  1. Check out the stable version by asdf update
  2. Change nodejs version, either by asdf local nodejs version, asdf global nodejs version or trigger by a .tool-versions file.

Expected behavior

npm -v should print the npm version.

Actual behavior

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

Environment

OS:
macOS 10.13

asdf version:
v0.4.0

Most helpful comment

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.

All 9 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rhiroyuki picture rhiroyuki  路  3Comments

jamesstidard picture jamesstidard  路  4Comments

point-source picture point-source  路  4Comments

johnjelinek picture johnjelinek  路  3Comments

peleteiro picture peleteiro  路  3Comments