title: Moving NodeJs App to a new server causing errors on npm install
body: <p>Hi I'm moving a NodeJS App to a completely new server Ubuntu 20.04 (same as previous). The old server has nodejs v13.14.0 and the new server has nodejs v14.7.0</p>
  <p>Upon running npm install I receive the following errors, Could someone provide some direction on how to resolve the errors please. not sure if the errors stem form one issue or these are all different errors. Perhaps I've got some permission wrong or i've configured the server incorrectly.</p>
  <p>npm install</p>
  <pre><code>&gt; bcrypt@4.0.1 install /home/jspce01/node_modules/bcrypt
  &gt; node-pre-gyp install --fallback-to-build
  
  node-pre-gyp WARN Using needle for node-pre-gyp https download
  node-pre-gyp WARN Pre-built binaries not installable for bcrypt@4.0.1 and node@14.7.0 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
  node-pre-gyp WARN Hit error Remote end closed socket abruptly.
  gyp ERR! build error
  gyp ERR! stack Error: not found: make
  gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
  gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
  gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
  gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
  gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
  gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
  gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:176:21)
  gyp ERR! System Linux 5.4.0-42-generic
  gyp ERR! command &quot;/usr/bin/node&quot; &quot;/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js&quot; &quot;build&quot; &quot;--fallback-to-build&quot; &quot;--module=/home/jetspace01/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node&quot; &quot;--module_name=bcrypt_lib&quot; &quot;--module_path=/home/jetspace01/node_modules/bcrypt/lib/binding/napi-v3&quot; &quot;--napi_version=6&quot; &quot;--node_abi_napi=napi&quot; &quot;--napi_build_version=3&quot; &quot;--node_napi_label=napi-v3&quot;
  gyp ERR! cwd /home/jetspace01/node_modules/bcrypt
  gyp ERR! node -v v14.7.0
  gyp ERR! node-gyp -v v5.1.0
  gyp ERR! not ok
  node-pre-gyp ERR! build error
  node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/jetspace01/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/jetspace01/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
  node-pre-gyp ERR! stack     at ChildProcess.&lt;anonymous&gt; (/home/jetspace01/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
  node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
  node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1051:16)
  node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
  node-pre-gyp ERR! System Linux 5.4.0-42-generic
  node-pre-gyp ERR! command &quot;/usr/bin/node&quot; &quot;/home/jetspace01/node_modules/.bin/node-pre-gyp&quot; &quot;install&quot; &quot;--fallback-to-build&quot;
  node-pre-gyp ERR! cwd /home/jetspace01/node_modules/bcrypt
  node-pre-gyp ERR! node -v v14.7.0
  node-pre-gyp ERR! node-pre-gyp -v v0.14.0
  node-pre-gyp ERR! not ok
  Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/jetspace01/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/jetspace01/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=6 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! bcrypt@4.0.1 install: `node-pre-gyp install --fallback-to-build`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the bcrypt@4.0.1 install script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2020-08-06T13_21_22_908Z-debug.log
  </code></pre>
  <p><strong>UPDATE</strong> After running - sudo apt-get install build-essential -</p>
  <pre><code>root@ubuntu01:/home/jetspace01# npm install
  
  &gt; bcrypt@4.0.1 install /home/jetspace01/node_modules/bcrypt
  &gt; node-pre-gyp install --fallback-to-build
  
  node-pre-gyp WARN Using needle for node-pre-gyp https download
  node-pre-gyp WARN Pre-built binaries not installable for bcrypt@4.0.1 and node@14.7.0 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
  node-pre-gyp WARN Hit error Remote end closed socket abruptly.
  make: Entering directory '/home/jetspace01/node_modules/bcrypt/build'
    CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
    AR(target) Release/obj.target/../node-addon-api/src/nothing.a
    COPY Release/nothing.a
    CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
    CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
    CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
    SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
    COPY Release/bcrypt_lib.node
    COPY /home/jetspace01/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node
    TOUCH Release/obj.target/action_after_build.stamp
  make: Leaving directory '/home/jetspace01/node_modules/bcrypt/build'
  added 255 packages from 280 contributors and audited 255 packages in 8.402s
  
  3 packages are looking for funding
    run `npm fund` for details
  
  found 0 vulnerabilities
  </code></pre>