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

Unable to Execute npx Command #351

Open
arb opened this issue May 17, 2023 · 6 comments
Open

Unable to Execute npx Command #351

arb opened this issue May 17, 2023 · 6 comments

Comments

@arb
Copy link

arb commented May 17, 2023

When trying to use a pretty standard npx command, I'm getting file not found errors. I've tried reshim and resourcing my shell to no avail.

npx browserslist@latest --update-db
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path /Users/xxx/.asdf/installs/nodejs/18.12.1/.npm
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, lstat '/Users/xxx/.asdf/installs/nodejs/18.12.1/.npm'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxx/.npm/_logs/2023-05-17T13_26_41_876Z-debug-0.log
@augustobmoura
Copy link
Member

Hi @arb 👋
Can you try updating asdf and asdf-nodejs?

asdf update
asdf plugin update nodejs

@cajual
Copy link

cajual commented Jun 3, 2023

@arb npm isn't initialized, try running npm install -g npm@<your _version> this will generate the dot npm file.

@juanestorres
Copy link

@cajual I had the same issue and your solution worked for me! Thank you!

@augustobmoura
Copy link
Member

asdf-nodejs is not supposed to use the .npm dir anymore, npm install shouldn't generate a dot npm directory unless we have a bug. This is why I asked that you guys update and test it again. Are you sure you were having this problem even on an updated plugin @juanestorres?

@ricca509
Copy link

ricca509 commented Jul 5, 2023

I had the same issue and after updating I was able to run npx commands succesfully, thanks @augustobmoura

@davidruizdiaz
Copy link

davidruizdiaz commented Dec 27, 2023

Hi @arb 👋 Can you try updating asdf and asdf-nodejs?

asdf update
asdf plugin update nodejs

Thanks! It worked for me

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

6 participants