// 2. Promise import { readFile } from 'node:fs/promises'; readFile('a.txt', 'utf8') .then((data) => console.log(data)) .catch((err) => console.error(err));