jprichardson / node-fs-extra

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
MIT License
9.43k stars 775 forks source link

TypeError is not a function for file write functions #1034

Open sebastianwessel opened 7 months ago

sebastianwessel commented 7 months ago

writeJson/writeJSON and outputJson/outputJSON and corresponding sync functions are throwing.

Example:

import * as fsExtra from 'fs-extra'

await fsExtra.writeJson(fileName, {some:'content'})

Error during execution:

TypeError: fsExtra.[writeJson] is not a function
RyanZim commented 6 months ago

Try import fsExtra from 'fs-extra'