nvm设置后如何解决Sourcetree节点路径问题?
How to resolve Sourcetree node path issues after nvm setup?
在使用多个版本的节点设置 nvm 后,Sourcetree 开始抛出如下错误。 Sourcetree 无法找到确切的节点路径。
如何将默认节点路径设置为 Sourcetree 的目标?
Info: can't find node in PATH, trying to find a node binary on your system
/Users/project-ui/node_modules/husky/run.js:8
message(requiredVersion) {
^
SyntaxError: Unexpected token (
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
Completed successfully
我通过几步就搞定了
which node
: /Users/xyz/.nvm/versions/node/v12.18.2/bin/node
我将其包含在 bash_profile 中的路径变量中:
export PATH="/Users/xyz/.nvm/versions/node/v12.18.2/bin:$PATH"
像魅力一样工作
在使用多个版本的节点设置 nvm 后,Sourcetree 开始抛出如下错误。 Sourcetree 无法找到确切的节点路径。
如何将默认节点路径设置为 Sourcetree 的目标?
Info: can't find node in PATH, trying to find a node binary on your system
/Users/project-ui/node_modules/husky/run.js:8
message(requiredVersion) {
^
SyntaxError: Unexpected token (
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
Completed successfully
我通过几步就搞定了
which node
: /Users/xyz/.nvm/versions/node/v12.18.2/bin/node
我将其包含在 bash_profile 中的路径变量中:
export PATH="/Users/xyz/.nvm/versions/node/v12.18.2/bin:$PATH"
像魅力一样工作