Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError is not a function for file write functions #1034

Open
sebastianwessel opened this issue Feb 3, 2024 · 1 comment
Open

TypeError is not a function for file write functions #1034

sebastianwessel opened this issue Feb 3, 2024 · 1 comment

Comments

@sebastianwessel
Copy link

  • Operating System: macOS 14.2.1 (23C71)
  • Node.js version: 20.11
  • fs-extra version: 11.2.0
  • @types/fs-extra version: 11.0.4
  • typescript version: 5.3.2

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
Copy link
Collaborator

RyanZim commented Feb 5, 2024

Try import fsExtra from 'fs-extra'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants