nvm-exec no such file or directory

Created on 3 Oct 2015  Â·  14Comments  Â·  Source: nvm-sh/nvm

➜ ~ nvm exec Running node (npm v2.14.4) nvm:534: no such file or directory: /Users/damir/.nvm/nvm-exec

I am running zsh and oh-my-zsh if that matters.

image

needs followup non-issue / invalid shell oh-my-zsh

Most helpful comment

In case anyone else ends up here from a search engine, these fixed the problem for me.

mkdir -p ~/.nvm
cd ~/.nvm
ln -s $(brew --prefix nvm)/nvm.sh
ln -s $(brew --prefix nvm)/nvm-exec

This or something like it should be added to the nvm recipe in homebrew.

All 14 comments

It likely does - omz tends to cause lots of problems with nvm that I have to manually fix one at a time.

I will note, however, that installing nvm via homebrew is 100% unsupported, and I'd strongly encourage you to brew uninstall it, and then install it properly via the curl command in the README.

@ljharb Just FYI, we are perfectly happy to remove nvm from Homebrew & prevent people resubmitting if you would like us to. We're not looking to hold you hostage on this.

@DomT4 I appreciate the willingness. I'm thinking about how to best handle this - I don't mind people using an unsupported install mechanism, but those people need to know that it is indeed unsupported. Perhaps a brew-specific warning, either in the formula, or inside nvm itself?

It's not such a frequent problem that I think it warrants the formula being removed; more that I'm concerned about those having problems who don't file issues.

@ljharb Would be happy to add a line in the formula caveats (Which are printed on every install/update/etc) to note the unsupported situation upstream if you would be happier with that. It would be nice to improve the relationship between nvm and Homebrew in any mutually-agreeable way that can be achieved.

For what it's worth we often ask people who report bugs to us to verify the problem reproduces outside of Homebrew before we ask for it to be kicked upstream.

@DomT4 that sounds like a great step - just something like "Please note that installing nvm with homebrew is unsupported by nvm. If you have any issues, prior to reporting it ( https://github.com/creationix/nvm/issues/new ), please verify the problem reproduces when installing nvm with curl first." would be great. Feel free to word it as you like.

@todesignandconquer Please do let me know if this problem still occurs when nvm is installed normally; if so I'd love to fix it.

@ljharb Thanks! Using curl instead of the homebrew version fixed it.

Thanks for confirming! @DomT4, let's file a new issue for further discussion of brew/nvm stuff.

@todesignandconquer How recently updated was your Homebrew, out of interest? As far as I'm aware and as far as our testing goes, I solved the no such file or directory problem for nvm-exec in https://github.com/Homebrew/homebrew/pull/44394/files.

@ljharb https://github.com/Homebrew/homebrew/commit/6e26556d2d8c231b15a17906503d77d989df72f1

@DomT4 As of yesterday. One of the problem solving attempts I tried.

@todesignandconquer Thanks for the reply. I wonder if people need to remove the old nvm-exec we previously recommended be moved to ~/.nvm for the fix to work :confused:

Any update on this? I installed via homebrew today and got the same error:

-bash: /Users/.../.nvm/nvm-exec: No such file or directory

@k-funk nvm is explicitly not supported via homebrew (the formula tells you this); if you brew uninstall it and install it properly with the curl script in the readme, it should work fine.

In case anyone else ends up here from a search engine, these fixed the problem for me.

mkdir -p ~/.nvm
cd ~/.nvm
ln -s $(brew --prefix nvm)/nvm.sh
ln -s $(brew --prefix nvm)/nvm-exec

This or something like it should be added to the nvm recipe in homebrew.

Was this page helpful?
0 / 5 - 0 ratings