fs/promises api in typescript not compiling in javascript correctly
The error was due to unsupported Node version 12.x which doesn’t support this require statement… var promises_1 = require(“fs/promises”); but this works var promises_1 = require(“fs”).promises; This can be solved by updating the Node to the latest.