node-pre-gyp command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
node-pre-gyp: command not found
or when using sudo you get the following error message
sudo: node-pre-gyp: command not found
Solutions to node-pre-gyp: command not found
How To Fix node-pre-gyp: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu node-pre-gyp is provided by node-pre-gyp package.
node-pre-gyp is:
This executable extends node-gyp with commands to package, test, and publish Node.js binary addons. It also improves build configuration and module loading.
This version is patched to always build modules from source.
node-gyp is a native addon build tool for Node.js
Node.js is an event-based server-side JavaScript engine.
To fix this problem, we can install more using the command below.
sudo apt-get -y install node-pre-gyp
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install node-pre-gyp.
sudo apt -y install node-pre-gyp
Or if you have aptitude installed you can use the following command.
sudo aptitude install node-pre-gyp
Summary
In this tutorial we learn how to fix node-pre-gyp command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.