The docs for removing a file say that it should be imported the same as readfile as far as I understand it.
am I missing something?
in my code I have:
import { readFile, rm } from 'fs/promises'
export async function foo () {
try {
const res = await readFile('./file.txt') // works
await rm('./file.txt') // TypeError: promises_1.rm is not a function
} catch(e) {
console.log('er', e)
}
}