title: Committing fails in Git hooks pre-commit because the node command wasn't found
body: <p>I generated a JHipster app with Angular and Java, inside of a repository that I had previously made. I then generated some JDL classes with it and the build was successful, but when I tried to commit my changes in GitHub, it threw the following error:</p>
  
  <pre><code>Commit failed - exit code 1 received, with output: '.git/hooks/pre-commit: line 32: node: command not found'
  </code></pre>
  
  <p>I looked inside of my pre-commit file:</p>
  
  <pre><code>#!/bin/sh
  # husky
  
  # Hook created by Husky
  #   Version: 1.3.1
  #   At: 2/13/2019, 12:10:11 PM
  #   See: https://github.com/typicode/husky#readme
  
  # From npm package
  #   Name: husky
  #   Directory: undefined
  #   Homepage: https://github.com/typicode/husky#readme
  
  scriptPath="JHipsterProject/node_modules/husky/run.js"
  hookName=`basename "$0"`
  gitParams="$*"
  
  debug() {
    [ "${HUSKY_DEBUG}" = "true" ] &amp;&amp; echo "husky:debug $1"
  }
  
  debug "$hookName hook started..."
  
  if [ -f "$scriptPath" ]; then
    # if [ -t 1 ]; then
    #   exec &lt; /dev/tty
    # fi
    if [ -f ~/.huskyrc ]; then
      debug "source ~/.huskyrc"
      source ~/.huskyrc
    fi
    node "$scriptPath" $hookName "$gitParams"
  else
    echo "Can't find Husky, skipping $hookName hook"
    echo "You can reinstall it using 'npm install husky --save-dev' or delete this hook"
  fi
  </code></pre>
  
  <p>The error was in line 32:</p>
  
  <pre><code>node "$scriptPath" $hookName "$gitParams"
  </code></pre>
  
  <p>I'm not familiar with pre-commit files or how they work, but I currently have <code>v10.15.0</code>for Node.js, and <code>1.8.0_201</code> for my Java JDK and JRE. The version of JHipster I'm using is <code>5.8.1</code>.</p>
  
  <p>Is there anything I should change in this file, including line 32 in order to get rid of the error in my commit?</p>
  
  <p>I'm also using the Visual Studio Code IDE if that helps at all.</p>
  
  <p>Thanks in advance.</p>