ENOENT: no such file or directory, code example
Example 1: Python.h: No such file or directory
For apt (Ubuntu, Debian...):
sudo apt-get install python-dev
sudo apt-get install python3-dev
For yum (CentOS, RHEL...):
sudo yum install python-devel
sudo yum install python3-devel
For dnf (Fedora...):
sudo dnf install python2-devel
sudo dnf install python3-devel
For zypper (openSUSE...):
sudo zypper in python-devel
sudo zypper in python3-devel
For apk (Alpine...):
sudo apk add python2-dev
sudo apk add python3-dev
For apt-cyg (Cygwin...):
apt-cyg install python-devel
apt-cyg install python3-devel
Example 2: Python.h: No such file or directory
sudo apt-get install python-dev
sudo apt-get install python3-dev
Example 3: npm ERR! enoent ENOENT: no such file or directory, open
rm -rf node_modules
npm install
git commit package-lock.json
git push
Example 4: ENOENT, no such file or directory
Have you created a package.json file? Maybe run this command first again.
C:\Users\Nuwanst\Documents\NodeJS\3.chat>npm init
It creates a package.json file in your folder.
Then run,
C:\Users\Nuwanst\Documents\NodeJS\3.chat>npm install socket.io --save
The --save ensures your module is saved as a dependency in your package.json file.
Example 5: Error: ENOENT: no such file or directory, open
cloudinary.config({
cloud_name: process.env.CLOUDINARY_NAME,
api_key: process.env.CLOUDINARY_API_KEY,
api_secret: process.env.CLOUDINARY_API_SECRET,
shorten: true,
secure: true,
ssl_detected: true
})
const response = await cloudinary.uploader.upload(req.file.path)
console.log(response)