Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Husky requires Node 10 (runtime: v8.10.0), can't run Git hook.

node -v: v12.20.1 sudo node -v: v8.10.0

Anyone know how to remedy this or what is actually going on? I'm not able to use git at all from phpstorm because of this.

question from:https://stackoverflow.com/questions/65904363/runtime-node-version-is-different-than-what-node-v-returns-husky-cant-run-gi

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

When being launched from desktop/System menu/Toolbox, WebStorm only sees environment variables configured in login shell, but not in interactive shell configuration files (like .bashrc or .zshrc), so the environment (including $PATH) is different from the one you have in terminal. Possible solutions:

  • Workaround 1: make required variables available in a login shell by moving them to the corresponding shell profile config
  • Workaround 2: run IDE from a terminal to make it inherit terminal environment

see also IDEABKL-7589


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...