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

Global package bins don't work on Node.js v10.3.0 #80

Closed
rstacruz opened this issue Jun 5, 2018 · 4 comments
Closed

Global package bins don't work on Node.js v10.3.0 #80

rstacruz opened this issue Jun 5, 2018 · 4 comments

Comments

@rstacruz
Copy link
Contributor

rstacruz commented Jun 5, 2018

When running bins from global packages in the latest Node.js version, you get the error:

No such command in 10.3.0 of nodejs

Steps to replicate

# Use the latest node.js
asdf install nodejs 10.3.0
asdf global nodejs 10.3.0

# Install a package
npm install -g gh

# Generate shims
asdf reshim nodejs

# Try to run it
gh
# No such command in 10.3.0 of nodejs

Workaround

The shims are made as .npm/bin/xxx, but are now in bin/xxx. To remedy this, you can make .npm/bin available again:

ln -nfs ../bin ~/.asdf/installs/nodejs/10.3.0/.npm/bin
@Stratus3D
Copy link
Member

@rstacruz if you think the workaroudn is all that is needed feel free to create a PR. I don't know enough to know if there is more that needs to change here or not.

@vic
Copy link
Contributor

vic commented Jan 19, 2019

Could probably be already fixed when using the new shim executor on asdf 0.6.4-dev (asdf-vm/asdf@cc78863). Could anyone test and report back?

@sevillaarvin
Copy link

sevillaarvin commented Nov 12, 2020

Hi, I experienced the same issue with [email protected].

Installed asdf via

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0
vim ~/.bashrc
# https://asdf-vm.com/#/core-manage-asdf
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash

Installed node via:

asdf install nodejs 15.2.0
asdf global nodejs 15.2.0

Installed global pnpm via:

npm i -g pnpm

However, running pnpm returns Command 'pnpm' not found.

I confirmed that pnpm exists, but somehow not included in PATH.

ls ~/.asdf/installs/nodejs/15.2.0/.npm/bin/
pnpm  pnpx

I executed asdf reshim nodejs and now it works.

@augustobmoura
Copy link
Member

I can't reproduce it anymore. It should have been fixed since #232. If the error still occurs, please comment in this thread so we can reopen it or create a new one.

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

5 participants