beyondcode / herd-community

88 stars 1 forks source link

[Bug]: Disable Node feature #388

Closed KevinBatdorf closed 6 months ago

KevinBatdorf commented 9 months ago

Operating system version

macOS Sonoma 14.2

System architecture

ARM64 (M1, M2, etc)

Herd Version

1.4.0 B20

PHP Version

No response

Bug description

Herd force adds some nvm config to the path which overrides my current node version manager (fnm).

Since it's auto injected, I have to close Herd or just use whatever Herd chose (I guess it uses Node 16)

I don't have nvm set up or anything in Herd

CleanShot 2024-02-09 at 20 00 45@2x

I'm sure you know already, but here is what's added

# Herd injected NVM configuration
export NVM_DIR="/Users/kevin/Library/Application Support/Herd/config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

[[ -f "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh" ]] && builtin source "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh"

Steps to reproduce

No response

Relevant log output

No response

davideprevosto commented 9 months ago

I am using Volta and I run into the same issue. I pinned node@20 with Volta, but nvm is serving the @18 version. I would like to turn off the Node section.

eleftrik commented 9 months ago

I totally agree with @KevinBatdorf. Herd should NOT interfere with .zshrc and overwrite configuration.

mpociot commented 9 months ago

For now, just comment out the zshrc additions. We only check for their existence, not if it's actually enabled or not 👍

eleftrik commented 9 months ago

Thank you @mpociot for your quick feedback! I appreciate 👍

djmtype commented 8 months ago

I was working along on a Node-based project; nothing to do with Herd; then all of a sudden my CLI tells me my node version is too old to compile my project. Only to find out using node -v and which node that Herd has decided to foil with my zshrc settings. WTF?! Not cool.

hamstu commented 8 months ago

Yeah, also agree this messed up my workflow in another project, and it took a while to realize Herd had changed my Node binary. I think this is a nifty feature, but it should have been opt-in.

murat-aksoy commented 8 months ago

Configuring Nodejs should be optional.

razaanstha commented 8 months ago

Yeah, please make the node version management thing optional.

jplhomer commented 8 months ago

On a similar note, would love to not have the update red bubble for the Node update management in the icon when I've explicitly disabled "Notify me about Node.js updates." Thought about opening a separate issue but I figured this would probably be tackled similarly 😅

Screenshot 2024-02-21 at 8 43 01 AM
carusog commented 7 months ago

Please, make Node version management optional. I see your point, but for those that already manage Node versions, it's really really annoying. I am personally using Volta, and I've got no alert, or notification that Herd was going to override my settings for Node, when it's supposed to be a PHP vm.

brysem commented 7 months ago

Really love the tool but a feature to disable NVM would be very useful. We use volta internally. The work around now is to manually remove the injected NVM configuration in our profiles.

JoshTristram commented 6 months ago

Jumping on here to add my support for allowing Node to be disabled. I cd'ed into a project yesterday, and then Node just started installing.