is-file-exists-async const isFileExists = require('is-file-exists-async'); if (await isFileExists(pathFile)) { // code }