title: npm install from a BASH script does not work correctly
body: <p>I wrote a simple script that is invoked with GIT PUSH DEPLOY via ssh on a production server that I report below.</p>
  <p>The problem is that the npm install command apparently produces a problem on a module (sharp) that is not installed.</p>
  <p>If I do the same thing via ssh terminal I have no problem.</p>
  <p>is there something I need to know about when to invoke npm install inside a bash script?</p>
  <pre><code> 1 #!/bin/bash
   2
   3 
   4 WWW=&quot;/opt/sites/strapi&quot;
   5 
   6 TMP=&quot;/srv/tmp/strapi&quot;
   7 
   8 REPO=&quot;/srv/git/strapi.git&quot;
   9
  10 ENV=&quot;/srv/tmp/strapi.env&quot;
  11 
  12 mkdir -p $TMP
  13 mkdir -p $ENV
  14
  15 cp $WWW/.env $ENV/
  16
  17 git --work-tree=$TMP --git-dir=$REPO checkout -f
  18
  19 cp $ENV/.env $TMP/
  20 cd $TMP
  21 npm install
  22 NODE_ENV=production npm run build
  23
  24 cd /
  25 rm -rf $WWW
  26 mv $TMP $WWW
  
  </code></pre>