title: How to fix amplify CLI error : "-bash: amplify: command not found"
body: <p>I had installed amplify cli on my laptop and even though it threw errors, I had used the <code>amplify configure</code> command anyway and it worked. But now when I'm trying to do the same thing on a different laptop it is throwing the error &quot;-bash: amplify: command not found&quot;. Below is the entire error block :</p>
  <pre><code>npm WARN deprecated @types/ora@3.2.0: This is a stub types definition. ora provides its own type definitions, so you do not need this installed.
  npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
  /Users/.npm-global/bin/amplify -&gt; /Users/.npm-global/lib/node_modules/@aws-amplify/cli/bin/amplify
  
  &gt; snappy@5.0.5 install /Users/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/snappy
  &gt; node-gyp rebuild
  
  gyp ERR! configure error 
  gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/snappy/build'
  gyp ERR! System Darwin 18.6.0
  gyp ERR! command &quot;/usr/local/bin/node&quot; &quot;/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js&quot; &quot;rebuild&quot;
  gyp ERR! cwd /Users/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/snappy
  gyp ERR! node -v v10.16.3
  gyp ERR! node-gyp -v v3.8.0
  gyp ERR! not ok 
  
  &gt; zmq@2.15.3 install /Users/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/zmq
  &gt; node-gyp rebuild
  
  gyp ERR! configure error 
  gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/zmq/build'
  gyp ERR! System Darwin 18.6.0
  gyp ERR! command &quot;/usr/local/bin/node&quot; &quot;/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js&quot; &quot;rebuild&quot;
  gyp ERR! cwd /Users/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/zmq
  gyp ERR! node -v v10.16.3
  gyp ERR! node-gyp -v v3.8.0
  gyp ERR! not ok 
  
  &gt; @aws-amplify/cli@3.11.0 postinstall /Users/.npm-global/lib/node_modules/@aws-amplify/cli
  &gt; node scripts/post-install.js
  
  Ignore installation errors for optional dependencies: gyp, fs-ext
  
  
  ----------------------------------------
  Successfully installed the Amplify CLI
  ----------------------------------------
  
  
  Javascript Getting Started - https://aws-amplify.github.io/docs/js/start
  
  
  Android Getting Started - https://aws-amplify.github.io/docs/android/start
  
  
  iOS Getting Started - https://aws-amplify.github.io/docs/ios/start
  
  
  npm WARN @conduitvc/mosca@2.8.3 requires a peer of leveldown@~1.4.3 but none is installed. You must install peer dependencies yourself.
  npm WARN @conduitvc/mosca@2.8.3 requires a peer of ioredis@^1.15.1 but none is installed. You must install peer dependencies yourself.
  npm WARN @conduitvc/mosca@2.8.3 requires a peer of mongodb@~2.1.4 but none is installed. You must install peer dependencies yourself.
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: snappy@5.0.5 (node_modules/@aws-amplify/cli/node_modules/snappy):
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: snappy@5.0.5 install: `node-gyp rebuild`
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: zmq@2.15.3 (node_modules/@aws-amplify/cli/node_modules/zmq):
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: zmq@2.15.3 install: `node-gyp rebuild`
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
  
  + @aws-amplify/cli@3.11.0
  </code></pre>
  <p>amplify commands are working totally fine on the other laptop which spat the same errors as above. I had even tried installing the cli using <code>npm install -g @aws-amplify/cli --unsafe-perm=true</code> as suggested by a user on GitHub. If someone could help me fix this it'd be really great. TIA</p>